@Test
public void testMinuteFormat() throws Exception {

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