RelativeLoanTermCondition extends AbstractRelativeRangeCondition { public static RelativeLoanTermCondition moreThan(final Ratio threshold) { final RangeCondition<Ratio> c = RangeCondition.relativeMoreThan(Wrapper::getRemainingTermInMonths, Wrapper::getOriginalTermInMonths, threshold); return new RelativeLoanTermCondition(c); } private  RelativeLoanTermCondition(final RangeCondition<Ratio> condition); static RelativeLoanTermCondition lessThan(final Ratio threshold); static RelativeLoanTermCondition moreThan(final Ratio threshold); static RelativeLoanTermCondition exact(final Ratio minimumThreshold, final Ratio maximumThreshold);  }
@Test void moreThan() { final MarketplaceFilterCondition condition = RelativeLoanTermCondition.moreThan(Ratio.fromPercentage(9)); final Wrapper<?> w = mock(Wrapper.class); when(w.getOriginalTermInMonths()).thenReturn(10); when(w.getRemainingTermInMonths()).thenReturn(0); assertThat(condition).rejects(w); when(w.getRemainingTermInMonths()).thenReturn(1); assertThat(condition).accepts(w); }