@Test
public void testMainSupport() throws Exception {

    Main main = new Main();
    main.start();
    assertThat("Camel contexts are not deployed!", main.getCamelContextMap(), allOf(hasKey("default"), hasKey("foo")));
    CamelContext context = main.getCamelContextMap().get("default");
    assertThat("Default Camel context is not started", context.getStatus(), is(equalTo(ServiceStatus.Started)));
    assertThat("Foo Camel context is not started", main.getCamelContextMap().get("foo").getStatus(), is(equalTo(ServiceStatus.Started)));
    MockEndpoint outbound = context.getEndpoint("mock:outbound", MockEndpoint.class);
    outbound.expectedMessageCount(1);
    outbound.expectedBodiesReceived("message");
    ProducerTemplate producer = main.getCamelTemplate();
    producer.sendBody("direct:inbound", "message");
    MockEndpoint.assertIsSatisfied(2L, TimeUnit.SECONDS, outbound);
    main.stop();
}