Metrics extends OpenMonBase<Timer> { public static void setMetricRegistry(MetricRegistry newMetricRegistry) { metrics = newMetricRegistry; }  @Override Timer start(JoinPoint.StaticPart jp); @Override void stop(Timer timer); static MetricRegistry getMetricRegistry(); static void setMetricRegistry(MetricRegistry newMetricRegistry);  }
@Test public void setMetricRegistry() throws Exception { MetricRegistry newMetricRegistry = new MetricRegistry(); Metrics.setMetricRegistry(newMetricRegistry); assertThat(Metrics.getMetricRegistry()).isEqualTo(newMetricRegistry); }