@Test
public void camelMicroserviceProviderTest() throws Exception {

   final String message = "But all the clocks in the city\n"
         + "   Began to whir and chime:\n"
         + "‘O let not Time deceive you,\n"
         + "   You cannot conquer Time.";
   final BootUtil bootUtil = new BootUtil();
   final Thread platform = bootUtil.getMicroservicePlatform(this.getClass().getPackage().getName());
   platform.start();
   Assert.assertTrue(semaphore.tryAcquire(1, TimeUnit.MINUTES), "Timed-out while waiting for the camel route deployment."); // wait for the route to be deployed
   CamelContext context = (CamelContext) bootUtil.getContext().getProperties().get(CamelMicroserviceProvider.CAMEL_CONTEXT);
   Endpoint endpoint = context.getEndpoint("direct:response");
   final StringBuilder response = new StringBuilder();
   endpoint.createConsumer(new Processor() {
      @Override
      public void process(final Exchange exchange) throws Exception {
         response.append(exchange.getIn().getBody().toString());
      }
   }).start();
   ProducerTemplate template = context.createProducerTemplate();
   template.sendBody("direct:test", message);
   Assert.assertEquals(response.toString(), message);
   platform.interrupt();
   platform.join();
}