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.