Skip to content
Advertisement

Can anyone tell me how to test my Camel Route if I have a choice operation?

I have a Camel route that has implemented a Content based Routing EIP(Choice operation). I need to test it. I’m new to Camel. So, I’m unsure how to do it. Can anyone tell me how to test this operation. I have mentioned a sample code below that has to be tested.

JavaScript

Advertisement

Answer

You can simply “advice” your route and add mocks to each choice of your content-based router

JavaScript

This probably needs a little more modifications to get it working. Let me know if you needed more clarification or a proper real test scenario for your route.

Advertisement