Hi,
Sorry about that William. I fixed the problem. Here's the correct route.
<route id="myRoute">
<from uri="myConsumer" />
<to uri="mock:static" />
</route>
And here's my spring junit test code for the same.
@EndpointInject(uri = "mock:static")
protected MockEndpoint staticEndpointURI;
@Test
public void testStatic(){
String body = null;
if (queryType.equals(STATIC_STR)) {
exchange = staticEndpointURI.getExchanges().get(0);
body = exchange.getIn().getBody(String.class);
}
assertTrue(body.contains("xml"));
}
Turns out that in "myConsumer", I needed to override my doStart() method, to
avoid calling getProcessor().process(exchange) before the services had been
started.
Hope this helps someone in a similar situation.
--
View this message in context:
http://camel.465427.n5.nabble.com/Camel-Testing-Framework-tp4631765p4635585.html
Sent from the Camel - Users mailing list archive at Nabble.com.