0 Replies Latest reply on Apr 2, 2015 10:10 AM by Osta Grunar

    Arquillian runner with CamelBlueprintTestSupport

    Osta Grunar Newbie

      I have a unit test extending CamelBlueprintTestSupport and in the last step of Camel route I am sending a message to a REST service using Camel HTTP component. In the normal test I am mocking this endpoint and check the result. However, instead of mocking this endpoint, I want to send a message to some TEST REST service, which I would like to make available before executing the test. For this, I would like to use Arquillian, which would create WAR archive containing my TEST REST service and run it in embedded Tomcat container. As a result, the route will send a message to TEST REST service.

       

       

      I have tried to do the above, but the combination of CamelBlueprintTestSupport and Arquillian runner does not seem to work. I define my unit test class as follows:

      @RunWith(Arquillian.class)

      public class MyTest extends CamelBlueprintTestSupport {...}

       

       

      But, at some point I am getting LinkageError complaining about having different Class objects used by org/apache/catalina/loader/WebappClassLoader and sun/misc/Launcher$AppClassLoader.

       

       

      Any advice on this?