### Question:
TemporalUtilities { public static String durationToString(long time) { if (time == 0) { return "0ms"; } final long years = time / YEAR_MS; time = time % YEAR_MS; final long months = time / MONTH_MS; time = time % MONTH_MS; final long days = time / DAY_MS; time = time % DAY_MS; final long hours = time / HOUR_MS; time = time % HOUR_MS; final long minuts = time / MINUTE_MS; time = time % MINUTE_MS; final long seconds = time / SECOND_MS; time = time % SECOND_MS; final long millis = time; final StringBuilder sb = new StringBuilder(); if (years > 0) sb.append(years).append("y "); if (months > 0) sb.append(months).append("m "); if (days > 0) sb.append(days).append("d "); if (hours > 0) sb.append(hours).append("h "); if (minuts > 0) sb.append(minuts).append("min "); if (seconds > 0) sb.append(seconds).append("s "); if (millis > 0) sb.append(millis).append("ms"); final int size = sb.length(); if (sb.charAt(size - 1) == ' ') { return sb.substring(0, size - 1); } else { return sb.toString(); } } private  TemporalUtilities(); static Date getDateFromString(final String dateString); static Date getDateFromString(String dateString, final boolean noGMTO); static String getTimeZone(final String dateString); static long getTimeInMillis(String periodDuration); static Duration getDurationFromString(String periodDuration); static Date julianToDate(final JulianDate jdt); static Date calendarDateToDate(final CalendarDate calDate); static Date dateAndTimeToDate(final DateAndTime dateAndTime); static Date temporalCoordToDate(
            final TemporalCoordinate temporalCoord); static Date ordinalToDate(final OrdinalPosition ordinalPosition); static Unit getUnitFromDuration(final Duration duration); @Deprecated static Date parseDate(final String date); @Deprecated static Date parseDate(final String date, final boolean noGMTO); static Calendar parseDateCal(final String date); static Date parseDateSafe(final String date, final boolean neverNull); static Date parseDateSafe(final String date, final boolean neverNull, final boolean noGMTO); static String durationToString(long time); static String toISO8601(final Date date); static String toISO8601(final Date date, TimeZone timezone); static String toISO8601Z(final Date date, TimeZone timezone); static final Unit<javax.measure.quantity.Time> MONTH_UNIT; static final Unit<javax.measure.quantity.Time> YEAR_UNIT; }### Answer:
@Test public void durationFormatingTest() { assertEquals("0ms", TemporalUtilities.durationToString(0)); assertEquals("15ms", TemporalUtilities.durationToString(15)); assertEquals("1s 25ms", TemporalUtilities.durationToString(1025)); assertEquals("1min 35ms", TemporalUtilities.durationToString(60035)); }