Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E7D1A185AF for ; Mon, 16 Nov 2015 21:47:11 +0000 (UTC) Received: (qmail 11411 invoked by uid 500); 16 Nov 2015 21:47:11 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 10963 invoked by uid 500); 16 Nov 2015 21:47:11 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 10714 invoked by uid 99); 16 Nov 2015 21:47:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Nov 2015 21:47:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 1A8552C0450 for ; Mon, 16 Nov 2015 21:47:11 +0000 (UTC) Date: Mon, 16 Nov 2015 21:47:11 +0000 (UTC) From: "Minh Tran (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CAMEL-9332) Support @MockEndpoint and @MockEndpointAndSkip in Spring Boot MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Minh Tran created CAMEL-9332: -------------------------------- Summary: Support @MockEndpoint and @MockEndpointAndSkip in Spr= ing Boot Key: CAMEL-9332 URL: https://issues.apache.org/jira/browse/CAMEL-9332 Project: Camel Issue Type: Improvement Components: camel-spring-boot, camel-test Affects Versions: 2.16.0 Environment: mac, jdk7 Reporter: Minh Tran My route looks like from(=E2=80=9Cdirect:start=E2=80=9D).to(=E2=80=9Cdirect:end=E2=80=9D) My unit test looks like @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes =3D Config.class) @MockEndpoints public class MyUnitTest { @Produce(uri=3D=E2=80=9Cdirect:start=E2=80=9D) private ProducerTemplate producer; @EndpointInject(uri=3D=E2=80=9Cmock:direct:end=E2=80=9D) private MockEndpoint end; =09@Test =09public void testMock() throws InterruptedException { =09=09end.expectedBodiesReceived("blah"); =09=09producerTemplate.sendBody("blah"); =09=09end.assertIsSatisfied(); =09} } It looks like the direct:end bit is never mocked so the assertion fails. It= =E2=80=99s like @MockEndpoints is completely ignored.=20 There are workarounds described here http://camel.465427.n5.nabble.com/spri= ng-boot-test-mocks-td5773902.html There are disadvantages to these workarounds as listed in that thread. Than= ks -- This message was sent by Atlassian JIRA (v6.3.4#6332)