private CamelContext camelContext;
private RouteStatistics statistics = new JMXRouteStatistics();
@Test
public void testRouteStats() throws Exception {
CamelContextResource resource = new CamelContextResource(camelContext);
RoutesDefinition routes = resource.getRoutesResource().getRouteDefinitions();
List<RouteDefinition> list = routes.getRoutes();
Object exchangesCompleted = statistics.getRouteStatistic(camelContext, list.get(0).getId(), "ExchangesCompleted");
assertEquals("JMX value incorrect, should be 0", new Long(0), exchangesCompleted);
NotifyBuilder notify = new NotifyBuilder(camelContext).whenDone(1).create();