params.put("decrement", value - 1);
result = component.createEndpoint("metrics:counter:long.counter", "counter:long.counter", params);
assertThat(result, is(notNullValue()));
assertThat(result, is(instanceOf(CounterEndpoint.class)));
CounterEndpoint ce = (CounterEndpoint) result;
assertThat(ce.getIncrement(), is(value + 1));
assertThat(ce.getDecrement(), is(value - 1));
assertThat(ce.getMetricsName(), is("long.counter"));
assertThat(ce.getRegistry(), is(metricRegistry));
inOrder.verify(camelContext, times(1)).getRegistry();
inOrder.verify(camelRegistry, times(1)).lookupByNameAndType(MetricsComponent.METRIC_REGISTRY_NAME, MetricRegistry.class);
inOrder.verify(camelContext, times(2)).getTypeConverter();
inOrder.verifyNoMoreInteractions();