### Question:
MetricsUtils { public static Context timer(Class<?> clazz, String name) { Timer timer = getDefaultRegistry() .timer(name(clazz, name)); return timer.time(); }  static MetricRegistry getDefaultRegistry(); static void registerGauge(String name, T value); static Context timer(Class<?> clazz, String name);  }### Answer:
@SuppressWarnings("EmptyTryBlock") @Test public void testTimer() { try (Context ignored = MetricsUtils.timer(MetricsUtilsTest.class, "foo")) { } Timer timer = MetricsUtils.getDefaultRegistry().timer(name(MetricsUtilsTest.class, "foo")); assertThat(timer.getCount()).isGreaterThanOrEqualTo(1L); }