title: Camel Spring test with "@SpringBootApplication" and "@MockEndpoints" breaking all unit tests
body: <p>I have camel+springboot application. And some unit tests: one test for one processor. They extends CamelTestSupport. They are working. 
  for example:</p>
  
  <pre><code>public class FaultProcessorTest extends CamelTestSupport {
      private static final Logger LOGGER = LoggerFactory.getLogger(FaultProcessorTest.class);
      @EndpointInject(uri = "mock:result")
      protected MockEndpoint mockResult;
  
      @Test
      public void testProcess() throws InterruptedException {
          LOGGER.info("FaultProcessorTest.testProcess()");
          String body = "AnyNoMatterBody";
          MockEndpoint mockResult = template.getCamelContext().getEndpoint("mock:result", MockEndpoint.class);
          template.setDefaultEndpointUri("direct:in");
          Exchange exchange = template.getDefaultEndpoint().createExchange();
  
          exchange.setProperty("requestId", "req00001");
          exchange.setProperty("targetSYS1Id", "tSYS100001");
          exchange.setProperty("FaultDetails", " FaultProcessorTest fault Details");
          exchange.setProperty("FaultActor", "TestFault");
          mockResult.setExpectedMessageCount(2);
  
          mockResult.whenAnyExchangeReceived(exc -&gt; {
              MyProcResp res = MyProcResp.class
                      .cast(exc.getIn().getBody(MyProcResp.class));
              assertTrue("assertion failed:  res.getFaults().size() &gt; 0", res.getFaults().size() &gt; 0);
              assertTrue("assertion failed: res.getStatus().equals(Status.FAILED.name())",
                      res.getStatus().equals(Status.FAILED.name()));
              assertTrue("assertion failed: res.getRequestId()!=null &amp;&amp; res.getRequestId().equals(\"req00001\")",
                      res.getRequestId() != null &amp;&amp; res.getRequestId().equals("req00001"));
              assertTrue("assertion failed: res.getTargetSYS1Id()!=null &amp;&amp; res.getTargetSYS1Id().equals(\"tSYS100001\")",
                      res.getTargetSYS1Id() != null &amp;&amp; res.getTargetSYS1Id().equals("tSYS100001"));
          });
          template.send(exchange);
          exchange.getIn().setBody(body);
          template.send(exchange);
          mockResult.assertIsSatisfied();
      }
  
      @Override
      // create route with their end-points in context
      protected RoutesBuilder createRouteBuilder() throws Exception {
          RouteBuilder response = new RouteBuilder() {
              @Override
              public void configure() throws Exception {
                  from("direct:in").process(new FaultProcessor()).to("mock:result");
              }
          };
          return response;
      }
  }
  </code></pre>
  
  <p>But then i want to test Route "As Is". Mock their endpoints, send message to one, and get message from another. And it works pretty good.
  My route:</p>
  
  <pre><code>@Component
  public class MyRoute extends RouteBuilder {
      @Autowired
      private FaultProcessor faultProcessor;
  
      @Value("${myprop.property1}")
      private long property1;
  
       @Override
      public void configure() throws Exception {
          ... Any nomatter content...
  
          from("direct:testReq").to("direct:testRes");
      }
  }
  </code></pre>
  
  <p>My Route test:</p>
  
  <pre><code>@RunWith(CamelSpringBootRunner.class)
  @MockEndpoints
  @SpringBootApplication
  @ContextConfiguration(classes = Application.class)
  @TestPropertySource("classpath:application4test.properties")
  @DirtiesContext(classMode=ClassMode.AFTER_CLASS)
  public class MyRouteTest {
      @Produce(uri = "direct:testReq")
      private ProducerTemplate producer;
  
      @EndpointInject(uri = "mock://direct:testRes")
      private MockEndpoint mock;
  
      @Test
      public void testRoute() throws Exception {
          mock.setExpectedMessageCount(1);
          mock.whenAnyExchangeReceived(exc -&gt; System.out.println("---check point---"));
          producer.setDefaultEndpointUri("direct:testReq");
          producer.sendBody("nomatter body");
          mock.assertIsSatisfied();
      }
  }
  </code></pre>
  
  <p>The problem is: if I run all tests together ("mvn test"), then all "simple" junit tests are in state  - FAILED. I think, Endpoints are not mocked. </p>
  
  <p>If I run them without "MyRouteTest" (delete it or start other tests one-by-one, like "mvn -Dtest=FaultProcessorTest test") they are all -"SUCCESS".</p>
  
  <p>What is the problem ? Why "unit" tests depends one from another? </p>