### Question:
StopWatch { public StopWatch() { this(true); } StopWatch();  StopWatch(boolean started); void restart(); long stop(); long taken();  }### Answer:
@Test public void testStopWatch() throws Exception { StopWatch watch = new StopWatch(); Thread.sleep(200); long taken = watch.stop(); assertEquals(taken, watch.taken()); assertTrue("Should take approx 200 millis, was: " + taken, taken > 150); }