template.sendBody("direct:start", "3");
template.sendBody("direct:start", "7");
assertMockEndpointsSatisfied();
TypeConverterRegistry reg = context.getTypeConverterRegistry();
assertTrue("Should be enabled", reg.getStatistics().isStatisticsEnabled());
Long failed = reg.getStatistics().getFailedCounter();
assertEquals(0, failed.intValue());
Long miss = reg.getStatistics().getMissCounter();
assertEquals(0, miss.intValue());
try {
template.sendBody("direct:start", "foo");
fail("Should have thrown exception");
} catch (Exception e) {
// expected
}
// should now have a failed
failed = reg.getStatistics().getFailedCounter();
assertEquals(1, failed.intValue());
miss = reg.getStatistics().getMissCounter();
assertEquals(0, miss.intValue());
// reset
reg.getStatistics().reset();
failed = reg.getStatistics().getFailedCounter();
assertEquals(0, failed.intValue());
miss = reg.getStatistics().getMissCounter();
assertEquals(0, miss.intValue());
}