SystemTimeSource implements TimeSource { @Override public void sleep(long milliseconds) throws InterruptedException { Thread.sleep(milliseconds); }  @Override long nanoTime(); @Override void sleep(long milliseconds);  }
@Test public void sleep() throws Exception { SystemTimeSource timeSource = new SystemTimeSource(); long start = System.currentTimeMillis(); timeSource.sleep(200L); long end = System.currentTimeMillis(); long duration = end - start; assertTrue(duration >= 200L); }