SystemTimeSource implements TimeSource { @Override public long nanoTime() { return System.nanoTime(); }  @Override long nanoTime(); @Override void sleep(long milliseconds);  }
@Test public void nanoTime() { SystemTimeSource timeSource = new SystemTimeSource(); long start = System.nanoTime(); long measured = timeSource.nanoTime(); long end = System.nanoTime(); assertTrue(start - measured <= 0); assertTrue(measured - end <= 0); }