BasicStopwatch implements Stopwatch { @Override public long getDuration(TimeUnit timeUnit) { return timeUnit.convert(getDuration(), TimeUnit.NANOSECONDS); }  @Override void start(); @Override void stop(); @Override void reset(); @Override long getDuration(TimeUnit timeUnit); @Override long getDuration();  }
@Test public void testGetDuration() throws Exception { testStopwatch.start(); Thread.sleep(10); testStopwatch.stop(); assertTrue(testStopwatch.getDuration() > 9000000); }