### Question:
ServerContextImpl implements ServerContext { @Override public synchronized Timer registerTimer(String key) { checkIsRunning(); ParamChecker.notEmpty(key, "key"); key = getFullMetricKey(key, MetricType.TIMER); LOG.debug("'{}' - registerTimer({})", name, key); Timer timer = findMetric(MetricType.TIMER, key); if (timer == null) { timer = metricRegistry.register(key, createTimer()); } return timer; } ServerContextImpl(String name, String prefix, int asyncThreads,
      int asyncMaxQueued, int schedulerThreads); @SuppressWarnings("unchecked") synchronized void start(); synchronized void stop(); synchronized MetricRegistry getMetricRegistry(); @Override Scheduled scheduleExecution(Callable<Void> callable,
      long firstExecutionDelay, long executionInterval, TimeUnit timeUnit); @Override boolean asyncExecution(Callable<Void> callable); @Override boolean asyncExecution(Callable<Void> callable, long executionDelay,
      TimeUnit timeUnit); @Override String createMetricKey(String component, String key); @Override synchronized void registerGauge(String key, Gauge gauge); @Override synchronized Timer registerTimer(String key); @Override synchronized Meter registerMeter(String key);  }### Answer:
@Test public void testRegisterTimer() throws Exception { ServerContextImpl impl = new ServerContextImpl("llama", "Server Context", 50, 50, 2); try { impl.start(); String key = impl.createMetricKey("Test", "ServerContext"); Timer timer1 = impl.registerTimer(key); Timer timer2 = impl.registerTimer(key); Assert.assertEquals(timer1, timer2); String key2 = impl.createMetricKey("Test", "ServerContext 2"); Timer timer3 = impl.registerTimer(key2); Assert.assertNotSame(timer1, timer3); } finally { impl.stop(); } }