I have a spring boot application with camel. I have a java defined route. I am using selector in that.
from("jms:Q1?selector=fruit='apple'").process(appleProcessor);
from("jms:Q1?selector=fruit='orange'").process(orangeProcessor);
I want to write a test case where I need to validate if the selector worked properly and if the correct processor was invoked.
So how to mock the processor. Is it like mocking endpoint.
Or is it like mocking an object (the appleProcessor, defining its bean in a context configuration class) and validating by:
Mockito.verify(appleProcessor, VerificationModeFactory.times(1)).process(Mockito.any());
In my test case I use the ProducerTemplate to send the msg, and my route is being invoked correctly.
Please help.