Hi,

I try to test a camel route via pax exam. In general I followed the tutorial by jb (http://blog.nanthrax.net/2014/08/testing-utest-and-itest-apache-camel-blueprint-route/)

The route I'd like to test sends a message to an activemq queue. Therefor I'd like to grab that message in my test and send it to the mock:result endpoint. But now I have the problem that my test fails with an error:

Failed to resolve endpoint: activemq://queue:qstep.order.sales due to: No component found with scheme: activemq

I thought I have to add the component to the camel context.. therefor I implemented the following method in the route builder:

@Override
publicModelCamelContextgetContext() {
    ModelCamelContext context =super.getContext();
    context.addComponent("activemq", newActiveMQComponent());
    returncontext;
}

But then I get the error: Cannot add component as its already previously added: activemq

Here is my test environment:

servicemix 4.5.2 as testcontainer

test class: http://pastebin.com/4zqdNtZC

thank you for any hints you could give.

regards, Marco




Reply via email to