Deadline { public boolean isMin() { return value == INTERNAL_MIN_VALUE; } private  Deadline(final long deadlineMillis); static Deadline calculate(final long timeMillis, final TimeValue timeValue); static Deadline calculate(final TimeValue timeValue); static Deadline fromUnixMilliseconds(final long value); static Deadline parse(final String source); @Override boolean equals(final Object obj); String format(final TimeUnit overdueTimeUnit); String formatTarget(); Deadline freeze(); long getValue(); @Override int hashCode(); boolean isBefore(final long millis); boolean isExpired(); boolean isMax(); boolean isMin(); boolean isNotExpired(); Deadline min(final Deadline other); long remaining(); TimeValue remainingTimeValue(); @Override String toString(); static final String DATE_FORMAT; static Deadline MAX_VALUE; static Deadline MIN_VALUE; }
@Test public void testIsMin() { Assert.assertTrue(Deadline.fromUnixMilliseconds(0).isMin()); Assert.assertFalse(Deadline.fromUnixMilliseconds(1000).isMin()); Assert.assertFalse(Deadline.MAX_VALUE.isMin()); Assert.assertTrue(Deadline.MIN_VALUE.isMin()); }