@Test
public void testTruncatedTo() {

  List<LocalTime> times =
      ImmutableList.of(
          LocalTime.of(5, 11, 24),
          LocalTime.of(21, 11, 24),
          LocalTime.MIDNIGHT,
          LocalTime.NOON,
          LocalTime.MIN,
          LocalTime.MAX);
  for (LocalTime time : times) {
    assertEquals(time.truncatedTo(SECONDS), asLocalTime(truncatedTo(SECONDS, pack(time))));
    assertEquals(time.truncatedTo(MINUTES), asLocalTime(truncatedTo(MINUTES, pack(time))));
    assertEquals(time.truncatedTo(HOURS), asLocalTime(truncatedTo(HOURS, pack(time))));
    assertEquals(time.truncatedTo(HALF_DAYS), asLocalTime(truncatedTo(HALF_DAYS, pack(time))));
    assertEquals(time.truncatedTo(DAYS), asLocalTime(truncatedTo(DAYS, pack(time))));
  }
}