@Test
public void testIsValidHrMinSec() {

    assertEquals(true, isValidHrMinSec(0, 0, 0, false, false));
    assertEquals(true, isValidHrMinSec(0, 0, 0, false, true));
    assertEquals(true, isValidHrMinSec(0, 0, 0, true, false));
    assertEquals(false, isValidHrMinSec(0, 0, 60, true, true));
    assertEquals(false, isValidHrMinSec(0, 0, 60, true, false));
    assertEquals(false, isValidHrMinSec(0, 60, 0, true, true));
    assertEquals(false, isValidHrMinSec(0, 60, 0, true, false));
    assertEquals(true, isValidHrMinSec(23, 0, 0, true, true));
    assertEquals(true, isValidHrMinSec(23, 0, 0, true, false));
    assertEquals(false, isValidHrMinSec(24, 0, 0, true, true));
    assertEquals(true, isValidHrMinSec(24, 0, 0, true, false));
    assertEquals(false, isValidHrMinSec(0, 0, -1, true, true));
    assertEquals(false, isValidHrMinSec(0, -1, 0, true, true));
    assertEquals(false, isValidHrMinSec(-1, 0, 0, true, true));
    assertEquals(true, isValidHrMinSec(0, 0, -1, true, false));
    assertEquals(true, isValidHrMinSec(0, -1, 0, true, false));
    assertEquals(true, isValidHrMinSec(-1, 0, 0, true, false));
    assertEquals(false, isValidHrMinSec(-1, -1, 0, true, false));
    assertEquals(false, isValidHrMinSec(-1, -1, -1, true, false));
    assertEquals(false, isValidHrMinSec(900, 0, 0, true, false));
    assertEquals(true, isValidHrMinSec(900, 0, 0, false, false));
}