### Question:
StopWatch { public static String formatMillis(long theMillis) { return formatMillis((double) theMillis); } 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 testFormatMillis() { assertEquals("0.134ms", StopWatch.formatMillis(0.1339d).replace(',', '.')); assertEquals("1000ms", StopWatch.formatMillis(DateUtils.MILLIS_PER_SECOND)); assertEquals("00:01:00.000", StopWatch.formatMillis(DateUtils.MILLIS_PER_MINUTE)); assertEquals("00:01:01", StopWatch.formatMillis(DateUtils.MILLIS_PER_MINUTE + DateUtils.MILLIS_PER_SECOND)); assertEquals("01:00:00", StopWatch.formatMillis(DateUtils.MILLIS_PER_HOUR)); assertEquals("1.0 day", StopWatch.formatMillis(DateUtils.MILLIS_PER_DAY).replace(',', '.')); assertEquals("2.0 days", StopWatch.formatMillis(DateUtils.MILLIS_PER_DAY * 2).replace(',', '.')); assertEquals("2.0 days", StopWatch.formatMillis((DateUtils.MILLIS_PER_DAY * 2) + 1).replace(',', '.')); assertEquals("2.4 days", StopWatch.formatMillis((DateUtils.MILLIS_PER_DAY * 2) + (10 * DateUtils.MILLIS_PER_HOUR)).replace(',', '.')); assertEquals("11 days", StopWatch.formatMillis((DateUtils.MILLIS_PER_DAY * 11) + (10 * DateUtils.MILLIS_PER_HOUR))); }