### Question:
ServerContextImpl implements ServerContext { @Override public Scheduled scheduleExecution(Callable<Void> callable, long firstExecutionDelay, long executionInterval, TimeUnit timeUnit) { checkIsRunning(); ParamChecker.notNull(callable, "callable"); ParamChecker.greaterEqualZero(firstExecutionDelay, "firstExecutionDelay"); ParamChecker.greaterThan(executionInterval, 0, "executionInterval"); ParamChecker.notNull(timeUnit, "timeUnit"); if (timeUnit.convert(executionInterval, TimeUnit.MILLISECONDS) < 10) { LOG.warn("'{}' - scheduleExecution({}, {}, {}, {}) interval below 10ms", name, callable, firstExecutionDelay, executionInterval, timeUnit); } else { LOG.debug("'{}' - scheduleExecution({}, {}, {}, {})", name, callable, firstExecutionDelay, executionInterval, timeUnit); } ScheduledFuture future = scheduledExecutor.scheduleAtFixedRate( new AsyncRunnable(callable, TimeUnit.MILLISECONDS.convert(firstExecutionDelay, timeUnit), TimeUnit.MILLISECONDS.convert(executionInterval, timeUnit), schedulerExecutorDelayTimer), firstExecutionDelay, executionInterval, timeUnit); return new ScheduledImpl(callable, future); } 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 testScheduleExecution() throws Exception { ServerContextImpl impl = new ServerContextImpl("llama", "Server Context", 2, 2, 2); try { impl.start(); final AtomicInteger number = new AtomicInteger(0); Callable<Void> task = new Callable<Void>() { @Override public Void call() throws Exception { number.incrementAndGet(); return null; } }; int interval = 10; ServerContext.Scheduled scheduled = impl.scheduleExecution(task, 0, interval, TimeUnit.MILLISECONDS); Assert.assertEquals(scheduled.getCallable(), task); Thread.sleep(interval*2); Assert.assertTrue(number.intValue() >= 2); scheduled.cancel(); Thread.sleep(interval); int currentNum = number.intValue(); Thread.sleep(interval); Assert.assertEquals(number.intValue(), currentNum); } finally { impl.stop(); } }