}
@Test
public void testMetricsRegistryFromCamelRegistry() throws Exception {
// TODO - 12.05.2014, Lauri - is there any better way to set this up?
MetricRegistry mockRegistry = endpoint.getCamelContext().getRegistry().lookupByNameAndType(MetricsComponent.METRIC_REGISTRY_NAME, MetricRegistry.class);
Counter mockCounter = Mockito.mock(Counter.class);
InOrder inOrder = Mockito.inOrder(mockRegistry, mockCounter);
when(mockRegistry.counter("A")).thenReturn(mockCounter);
endpoint.expectedMessageCount(1);
producer.sendBody(new Object());
endpoint.assertIsSatisfied();
inOrder.verify(mockRegistry, times(1)).counter("A");