### Question:
ZooKeeperMetricsImpl implements ZooKeeperMetrics { @Override public void updateTimer(final String name, final long duration, final TimeUnit timeUnit) { registry.timer(prefix + name).update(duration, timeUnit); } ZooKeeperMetricsImpl(final String group, final MetricRegistry registry); @Override void zookeeperTransientError(); @Override void updateTimer(final String name, final long duration, final TimeUnit timeUnit); @Override void connectionStateChanged(final ConnectionState newState);  }### Answer:
@Test public void testTimer() throws Exception { metrics.updateTimer("timer", 100, TimeUnit.NANOSECONDS); final String name = "group.zookeeper.timer"; assertThat(registry.getTimers(), hasKey(name)); final Timer timer = registry.timer(name); assertEquals(1, timer.getCount()); assertArrayEquals(new long[]{ 100 }, timer.getSnapshot().getValues()); }