Hi,
I'm using Camel 2.14.x and do Unit tests with
AbstractJUnit4SpringContextTests.
My routes are written in java dsl. The camelcontext gets instantiated by
spring.
I want to mock my endpoint and don't know/understand the best practise
My route looks like that:
from("direct:application").id("firstbird-incomming-applications")
.to("log:eu.firstbird.firstbirdapi.application.consumer.firstbird-incomming-applications-start?level=INFO")
.log(LoggingLevel.INFO, logger, "Sending job application to
queue")
.setExchangePattern(ExchangePattern.InOnly)
.dynamicRouter().method(customerRouter,
"routeApplicationByCustomerType")
.process(new FirstbirdApplicationResponseProcessor())
.to("log:eu.firstbird.firstbirdapi.application.consumer.firstbird-incomming-applications-end?level=INFO");
Now I would like to mock the last log statement. To do that I thought I just
do it like that:
@EndpointInject(uri =
"mock:log:eu.firstbird.firstbirdapi.application.consumer.firstbird-incomming-applications-end")
private MockEndpoint mock;
But sadly that doesn't work. I don't have any exchanges...
I'm using Camel 2.14.x and do Unit tests with
AbstractJUnit4SpringContextTests.
My routes are written in java dsl. The camelcontext gets instantiated by
spring.
I want to mock my endpoint and don't know/understand the best practise
My route looks like that:
from("direct:application").id("firstbird-incomming-applications")
.to("log:eu.firstbird.firstbirdapi.application.consumer.firstbird-incomming-applications-start?level=INFO")
.log(LoggingLevel.INFO, logger, "Sending job application to
queue")
.setExchangePattern(ExchangePattern.InOnly)
.dynamicRouter().method(customerRouter,
"routeApplicationByCustomerType")
.process(new FirstbirdApplicationResponseProcessor())
.to("log:eu.firstbird.firstbirdapi.application.consumer.firstbird-incomming-applications-end?level=INFO");
Now I would like to mock the last log statement. To do that I thought I just
do it like that:
@EndpointInject(uri =
"mock:log:eu.firstbird.firstbirdapi.application.consumer.firstbird-incomming-applications-end")
private MockEndpoint mock;
But sadly that doesn't work. I don't have any exchanges...