Metrics extends OpenMonBase<Timer> { public static MetricRegistry getMetricRegistry() { return metrics; }  @Override Timer start(JoinPoint.StaticPart jp); @Override void stop(Timer timer); static MetricRegistry getMetricRegistry(); static void setMetricRegistry(MetricRegistry newMetricRegistry);  }
@Test public void testException() throws Exception { MetricRegistry metricRegistry = openMon.getMetricRegistry(); assertThat(metricRegistry.counter(SharedConstants.EXCEPTION_LABEL).getCount()).describedAs("No exception should exist yet").isEqualTo(0); assertThat(metricRegistry.counter(OpenMon.EXCEPTION_LABEL).getCount()).describedAs("No general exception should exist yet").isEqualTo(0); openMon.exception(jp, SharedConstants.EXCEPTION); assertThat(metricRegistry.counter(SharedConstants.EXCEPTION_LABEL).getCount()).describedAs("An exception should now exist").isEqualTo(1); assertThat(metricRegistry.counter(OpenMon.EXCEPTION_LABEL).getCount()).describedAs("An general exception should now exist").isEqualTo(1); }