### Question:
StopWatch extends Stated { public void add(long nanos) { time += nanos; } StopWatch(); long getStartTime(); long lap(); long getTime(); void resetClock(); void resetTime(); void onReset(); void add(long nanos); void add(StopWatch stopWatch); @Override String toString();  }### Answer:
@Test public void testAdd() { stopWatch.start(); stopWatch.stop(); long time = stopWatch.getTime(); long addend = 10; stopWatch.add(addend); Assert.assertEquals(addend + time, stopWatch.getTime()); long prevTime = stopWatch.getTime(); stopWatch.add(stopWatch); Assert.assertEquals(stopWatch.getTime(), prevTime * 2); }