Micrometer extends OpenMonBase<TimerContext> { protected Counter getCounter(String exceptionName) { return Counter.builder(exceptionName) .tag("automon", "exception") .description("automon.org exception counter") .register(registry); }  @Override TimerContext start(JoinPoint.StaticPart jp); @Override void stop(TimerContext context); static MeterRegistry getMeterRegistry(); static void setMeterRegistry(MeterRegistry newMeterRegistry);  }
@Test public void testCounterNotNull() { assertThat(openMon.getCounter(SharedConstants.EXCEPTION_LABEL)).isNotNull(); }
@Test public void testException() throws Exception { assertThat(openMon.getCounter(SharedConstants.EXCEPTION_LABEL).count()) .describedAs("No exception should exist yet").isEqualTo(0); openMon.exception(jp, SharedConstants.EXCEPTION); assertThat(openMon.getCounter(SharedConstants.EXCEPTION_LABEL).count()) .describedAs("One exception should exist").isEqualTo(1); }