### Question:
TimeInterval { public static String getFormattedDuration(TimeInterval interval) { return getFormattedDuration(interval.ms); } private  TimeInterval(long duration, TimeUnit unit); static String getUnitStr(TimeUnit unit); static TimeInterval millis(long duration); static TimeInterval seconds(long duration); static TimeInterval minutes(long duration); static TimeInterval hours(long duration); static TimeInterval days(long duration); static TimeInterval weeks(long duration); static TimeInterval months(long duration); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static TimeInterval fromString(String interval); static String getFormattedDuration(TimeInterval interval); static String getFormattedDurationShort(TimeInterval interval); static String getFormattedDurationShort(long ms); static String getFormattedDuration(long ms); static final TimeInterval MINUTE; static final TimeInterval HOUR; final long duration; final TimeUnit unit; final long ms; }### Answer:
@Test public void getFormattedDuration() { assertEquals("0 seconds", TimeInterval.getFormattedDuration(0)); assertEquals("1 second", TimeInterval.getFormattedDuration(1000)); assertEquals("2 seconds", TimeInterval.getFormattedDuration(2000)); assertEquals("2 minutes", TimeInterval.getFormattedDuration(2000 * 60)); assertEquals("2 hours", TimeInterval.getFormattedDuration(2000 * 60 * 60)); assertEquals("2 hours and 2 minutes", TimeInterval.getFormattedDuration(2000 * 60 * 60 + 2000 * 60)); assertEquals("2 hours and 2 minutes", TimeInterval.getFormattedDuration(2000 * 60 * 60 + 2000 * 60 + 2000)); }