@Test
void exact() {

    final MarketplaceFilterCondition condition = RelativeDiscountCondition.exact(Ratio.fromPercentage(8),
            Ratio.fromPercentage(10));
    final Wrapper<?> w = mock(Wrapper.class);
    when(w.getDiscount()).thenReturn(Optional.of(BigDecimal.ONE));
    when(w.getRemainingPrincipal()).thenReturn(BigDecimal.TEN);
    assertThat(condition).accepts(w);
    when(w.getRemainingPrincipal()).thenReturn(BigDecimal.valueOf(9));
    assertThat(condition).rejects(w);
    when(w.getRemainingPrincipal()).thenReturn(BigDecimal.valueOf(7));
    assertThat(condition).rejects(w);
}