### Question:
ServerContextImpl implements ServerContext { public synchronized void stop() { checkIsRunning(); state = ServerState.STOPPED; LOG.debug("'{}' - Stopping", name); metricRegistry = null; stopExecutorService(asyncExecutor); stopExecutorService(scheduledExecutor); } 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(expected = IllegalStateException.class) public void testStopNoStart() throws Exception { ServerContextImpl impl = new ServerContextImpl("llama", "Server Context", 2,2,2); impl.stop(); }