@Test
public void testIncrement() throws Exception {

    String originName = "metricName";
    String metricName = originName;
    this.counterService.increment(originName);
    metricName = LookoutSpringBootMetricsImpl.LOOKOUT_COUNTER_PREFIX + metricName;
    Metric metric = this.lookoutRegistryMetricReader.findOne(metricName);
    assertTrue(metric != null);
    assertEquals(1L, metric.getValue());
    //decrement
    this.counterService.decrement(originName);
    metric = this.lookoutRegistryMetricReader.findOne(metricName);
    assertTrue(metric != null);
    assertEquals(0L, metric.getValue());
}