### Question:
TimeUtils { @SuppressLint("DefaultLocale") public static String formatMillis(long millis) { long hr = TimeUnit.MILLISECONDS.toHours(millis); millis %= MILLIS_PER_HR; long min = TimeUnit.MILLISECONDS.toMinutes(millis); millis %= MILLIS_PER_MIN; long sec = TimeUnit.MILLISECONDS.toSeconds(millis); if(hr > 0) { return String.format(DURATION_TIME_FORMAT_WITH_HOURS, hr, min, sec); } else { return String.format(DURATION_TIME_FORMAT_NO_HOURS, min, sec); } }  static long secondsToMillis(double seconds); static long minutesToMillis(double minutes); static long hoursToMillis(double hours); @SuppressLint("DefaultLocale") static String formatMillis(long millis); static String formatSeconds(int seconds); static Date convertToLocalDate(Date utcDate); static Date convertToUtcDate(Date localDate); static int numYears(Date start, Date end); static int numYears(Date start, Calendar end); static int numYears(Calendar start, Calendar end); static String getFriendlyDate(Date date); static String getFriendlyDate(Date date, boolean relative);  }### Answer:
@Test public void formatMillis() { assertEquals("0:00", TimeUtils.formatMillis(0)); assertEquals("0:13", TimeUtils.formatMillis(13000)); assertEquals("5:00", TimeUtils.formatMillis(300000)); assertEquals("9:01", TimeUtils.formatMillis(541000)); assertEquals("9:59", TimeUtils.formatMillis(599000)); assertEquals("26:00", TimeUtils.formatMillis(1560000)); assertEquals("26:01", TimeUtils.formatMillis(1561000)); assertEquals("26:43", TimeUtils.formatMillis(1603000)); assertEquals("1:00:00", TimeUtils.formatMillis(3600000)); assertEquals("1:01:01", TimeUtils.formatMillis(3661000)); assertEquals("1:09:15", TimeUtils.formatMillis(4155000)); assertEquals("1:16:03", TimeUtils.formatMillis(4563489)); assertEquals("12:00:00", TimeUtils.formatMillis(43200000)); }