App { public static void main(String[] args) throws Exception { CamelContext context = new DefaultCamelContext(); context.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { from("direct:origin").multicast().to("mock:foo", "mock:bar", "stream:out"); } }); ProducerTemplate template = context.createProducerTemplate(); context.start(); context.getRoutes().stream().forEach(r -> LOGGER.info(r.toString())); template.sendBody("direct:origin", "Hello from origin"); context.stop(); }  static void main(String[] args);  }
@Test public void test() throws Exception { String[] args = {}; App.main(args); }