### Question:
ServerContextImpl implements ServerContext { @SuppressWarnings("unchecked") public synchronized void start() { if (state == ServerState.STARTED) { throw new IllegalStateException("Already started"); } if (state == ServerState.STOPPED) { throw new IllegalStateException("Already started and stopped"); } metricRegistry = new MetricRegistry(); asyncQueue = new DelayQueue<DelayedRunnable>(); ThreadFactory threadFactory = new NamedThreadFactory("ServerContext(" + name + ")"); asyncExecutor = new ThreadPoolExecutor(asyncThreads, asyncThreads, 0, TimeUnit.SECONDS, (BlockingQueue<Runnable>) (BlockingQueue) asyncQueue, threadFactory); asyncExecutor.prestartAllCoreThreads(); scheduledExecutor = new ScheduledThreadPoolExecutor(schedulerThreads, threadFactory); LOG.debug("'{}' - Starting with asyncThreads '{}', asyncMaxQueued '{}', " + "schedulerThreads '{}'", name, asyncThreads, asyncMaxQueued, schedulerThreads); state = ServerState.STARTED; schedulerExecutorDelayTimer = registerTimer(createMetricKey(name, "schedulerExecutor.delay")); asyncExecutorDelayTimer = registerTimer(createMetricKey(name, "asyncExecutor.delay")); } 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 testStart() throws Exception { ServerContextImpl impl = new ServerContextImpl("llama", "Server Context", 2,2,2); try { impl.start(); } finally { impl.stop(); } }