@Test
public void setMetricRegistry() throws Exception {

    MetricRegistry newMetricRegistry = new MetricRegistry();
    Metrics.setMetricRegistry(newMetricRegistry);
    assertThat(Metrics.getMetricRegistry()).isEqualTo(newMetricRegistry);
}