### Question:
StopWatch { public final synchronized long getElapsedTime() { return elapsedTime; }  synchronized void start(); synchronized void stop(); final synchronized long getElapsedTime();  }### Answer:
@Test public void getElapsedTime() throws InterruptedException { stopWatch.start(); Thread.sleep(100); stopWatch.stop(); assertTrue(stopWatch.getElapsedTime() < 110 && stopWatch.getElapsedTime() > 90); }