DaysSinceLastPastDueCondition extends AbstractRangeCondition<Integer> { public static DaysSinceLastPastDueCondition lessThan(final int threshold) { final RangeCondition<Integer> c = RangeCondition.lessThan(DaysSinceLastPastDueCondition::getDelinquentDays, LOAN_LIFE_IN_DAYS_DOMAIN, threshold); return new DaysSinceLastPastDueCondition(c); } private  DaysSinceLastPastDueCondition(final RangeCondition<Integer> condition); static DaysSinceLastPastDueCondition lessThan(final int threshold); static DaysSinceLastPastDueCondition moreThan(final int threshold); static DaysSinceLastPastDueCondition exact(final int minimumThreshold, final int maximumThreshold);  }
@Test void lessThan() { final MarketplaceFilterCondition condition = DaysSinceLastPastDueCondition.lessThan(1); final Wrapper<?> w = mock(Wrapper.class); when(w.getDaysSinceDpd()).thenReturn(OptionalInt.of(0)); assertThat(condition).accepts(w); when(w.getDaysSinceDpd()).thenReturn(OptionalInt.of(1)); assertThat(condition).rejects(w); }