### Question:
StopWatch { public StopWatch() { super(); } StopWatch();  StopWatch(Date theStart);  StopWatch(long theStart); void endCurrentTask(); String formatMillisPerOperation(long theNumOperations); String formatTaskDurations(); String formatThroughput(long theNumOperations, TimeUnit theUnit); String getEstimatedTimeRemaining(double theCompleteToDate, double theTotal); long getMillis(Date theNow); long getMillis(); long getMillisAndRestart(); long getMillisPerOperation(long theNumOperations); Date getStartedDate(); double getThroughput(long theNumOperations, TimeUnit theUnit); void restart(); void startTask(String theTaskName); @Override String toString(); static String formatMillis(long theMillis); static String formatMillis(double theMillis);  }### Answer:
@Test public void testStopwatch() throws Exception { StopWatch sw = new StopWatch(); Thread.sleep(100); assertThat(sw.getMillis(new Date()), greaterThan(10L)); assertThat(sw.getMillis(), greaterThan(10L)); assertThat(sw.getStartedDate().getTime(), lessThan(System.currentTimeMillis())); }