assertEquals("Get a wrong sent event number", 3, en.exchangeSentEvent.get());
}
protected CamelContext createCamelContext() throws Exception {
CamelContext camelContext = super.createCamelContext();
ShutdownStrategy shutdownStrategy = camelContext.getShutdownStrategy();
camelContext.addComponent("async", new MyAsyncComponent());
shutdownStrategy.setTimeout(1000);
shutdownStrategy.setTimeUnit(TimeUnit.MILLISECONDS);
shutdownStrategy.setShutdownNowOnTimeout(true);
ManagementStrategy managementStrategy = new DefaultManagementStrategy();
managementStrategy.addEventNotifier(en);