Two possibilities.
1) Use an embedded JMS server and a direct: route to feed the embedded
server.
2) Use adviceWith() on the route and the replaceFrom().

The second is the less desirable because you will have a heck of a time
simulating all of the headers that the JMS system sets. It can be done but
it is harder.

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Maintainable Java (Kindle
<http://www.amazon.com/Maintainable-Java-Robert-Simmons-Jr-ebook/dp/B00AKHI69K>)(iTunes
<https://itunes.apple.com/us/book/maintainable-java/id585666097?mt=11>)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*


On Tue, Jun 17, 2014 at 5:00 AM, mikaelfj <[email protected]> wrote:

> Hi Claus,
>
> Ok - I can see that I might be able to use inceptors to simulate the error.
>
> However, they won't let  me intercept the route so that the from(queue) -
> will fail when polling it - right?
>
> I will have to send a message to the endpoint in order to trigger the
> interceptor, which will then allow me to throw en exception to simulate
> connection problems at the queue-endpoint.
>
> Best regards
> Mikael
>
>
>
> -----
> NineConsult
> RegionH
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Unit-testing-from-jms-endpoint-tp5752351p5752413.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to