Delays { public static Long toMillis(Long delay) { return delay != null ? Duration.ofMinutes(delay).toMillis() : null; }  static long compareTimeAndDelay(TimeDelay startInclusive, TimeDelay endExclusive); static long compareTimeAndDelay(LocalTime time, TimeDelay timeDelay); static long compareTimeAndDelay(TimeDelay timeDelay, LocalTime time); static long compareTime(TimeDelay timeDelayA, TimeDelay timeDelayB); static long compareTime(TimeDelay timeDelay, LocalTime time); static long compareTime(LocalTime time, TimeDelay timeDelay); static long compareTime(LocalTime timeA, LocalTime timeB); static long computeDelay(LocalTime expectedTime, LocalTime effectiveTime); static LocalTime toLocalTime(Date date); static Long toMinutes(Long delay); static Long toMillis(Long delay); static final LocalDate DATE; }
@Test public void testToMillis() { Assert.assertEquals(15 * 1000 * 60, (long) Delays.toMillis(15L)); }