App { public static void main(String[] args) throws Exception { ConfigurableApplicationContext context = SpringApplication.run(App.class, args); CamelContext camelContext = (CamelContext) context.getBean("camelContext"); camelContext.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { from("{{endpoint}}").log("ENDPOINT: ${body}"); } }); String[] stringArray = {"Test item #1", "Test item #2", "Test item #3"}; camelContext.createProducerTemplate().sendBody("{{entry}}", stringArray); SpringApplication.exit(context); }  static void main(String[] args);  }
@Test public void testMain() throws Exception { String[] args = {}; App.main(args); }