Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 71C33108CE for ; Thu, 26 Feb 2015 08:44:29 +0000 (UTC) Received: (qmail 80213 invoked by uid 500); 26 Feb 2015 08:44:23 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 80169 invoked by uid 500); 26 Feb 2015 08:44:23 -0000 Mailing-List: contact dev-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 dev@camel.apache.org Delivered-To: moderator for dev@camel.apache.org Received: (qmail 10121 invoked by uid 99); 26 Feb 2015 07:16:39 -0000 X-ASF-Spam-Status: No, hits=1.3 required=5.0 tests=NORMAL_HTTP_TO_IP,URI_HEX X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: local policy) Date: Thu, 26 Feb 2015 00:15:51 -0700 (MST) From: meenakshisekar To: dev@camel.apache.org Message-ID: <1424934951322-5763189.post@n5.nabble.com> Subject: JUnit json MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, I'm starting with camel on Junit for my sample code. Would like to understand how to implement it for Json based case. My class looks like this, @Override public void configure() throws Exception { from("jetty:http://0.0.0.0:8080/content") .choice() .when(header("service").isEqualTo("XXXXX")) .to("http://localhost:4567/test.json?bridgeEndpoint=true&throwExceptionOnFailure=false") .otherwise() .to("http://localhost:5000/order?bridgeEndpoint=true&throwExceptionOnFailure=false"); } the structure of my Junit class looks like this, let me know on what has to be tested in test(testSendMatchingMessage) method. public class GLEndpointTest extends CamelTestSupport{ @EndpointInject(uri = "mock:result") protected MockEndpoint resultEndpoint; @Produce(uri = "direct:start") protected ProducerTemplate template; @Before public void setup() throws Exception { super.setUp(); context.addRoutes(new ContentBased()); } @Override protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { from("http://localhost:8080/content?service=customer").to("mock:result"); } }; } * @Test public void testSendMatchingMessage() throws Exception { ??????? }* } -- View this message in context: http://camel.465427.n5.nabble.com/JUnit-json-tp5763189.html Sent from the Camel Development mailing list archive at Nabble.com.