Browse souce code repository at: https://github.com/jjYBdx4IL/java-evaluation/blob/master/src/test/java/org/apache/commons/lang3/DurationFormatUtilsTest.java
package org.apache.commons.lang3;

import org.apache.commons.lang3.time.DurationFormatUtils;
import static org.junit.Assert.assertEquals;
import org.junit.Test;

/**
 *
 * @author Github jjYBdx4IL Projects
 */
public class DurationFormatUtilsTest {

    @Test
    public void test() {
        assertEquals("0:01:01", DurationFormatUtils.formatDuration(61001L, "H:mm:ss"));
        assertEquals("1:01", DurationFormatUtils.formatDuration(61001L, "m:ss"));
        assertEquals("01:01", DurationFormatUtils.formatDuration(61001L, "mm:ss"));
    }
}
-------------------------------------------------------------------------------
Test set: org.apache.commons.lang3.DurationFormatUtilsTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 s - in org.apache.commons.lang3.DurationFormatUtilsTest
test  Time elapsed: 0 s