@Test
void conditions() {

    final DefaultPortfolio portfolio = DefaultPortfolio.PROGRESSIVE;
    final ParsedStrategy strategy = new ParsedStrategy(portfolio); // test for default values
    assertThat(strategy.getApplicableLoans(Stream.empty(), FOLIO)).isEmpty();
    // add loan; without filters, should be applicable
    final LoanImpl loan = ParsedStrategyTest.mockLoan(2);
    final LoanDescriptor ld = new LoanDescriptor(loan);
    assertThat(strategy.getApplicableLoans(Stream.of(ld), FOLIO)).contains(ld);
    // now add a filter and see no loans applicable
    final MarketplaceFilter f = mock(MarketplaceFilter.class);
    when(f.test(ArgumentMatchers.eq(Wrapper.wrap(ld, FOLIO)))).thenReturn(true);
    final ParsedStrategy strategy2 = new ParsedStrategy(portfolio, Collections.singleton(f));
    assertThat(strategy2.getApplicableLoans(Stream.of(ld), FOLIO)).isEmpty();
}