@Test
public void testSecondsFormat() throws Exception {

    String result = DateUtils.ensureTwoDigits("2015-M1-D23 H3:m0:s0", DateIntervalType.SECOND);
    assertThat(result).isEqualTo("2015-01-23 03:00:00");
    result = DateUtils.ensureTwoDigits("2015-M11-D01 H23:m59:s59", DateIntervalType.SECOND);
    assertThat(result).isEqualTo("2015-11-01 23:59:59");
}