@Test
void noLoansApplicable() {

    final MarketplaceFilter filter = MarketplaceFilter.of(MarketplaceFilterCondition.alwaysAccepting());
    final ParsedStrategy p = new ParsedStrategy(DefaultPortfolio.PROGRESSIVE, Collections.singleton(filter));
    final InvestmentStrategy s = new NaturalLanguageInvestmentStrategy(p);
    final PortfolioOverview portfolio = mock(PortfolioOverview.class);
    when(portfolio.getShareOnInvestment(any())).thenReturn(Ratio.ZERO);
    when(portfolio.getInvested()).thenReturn(p.getMaximumInvestmentSize()
        .subtract(1));
    final Stream<RecommendedLoan> result = s.recommend(Collections.singletonList(new LoanDescriptor(mockLoan(2))),
            portfolio, mockSessionInfo());
    assertThat(result).isEmpty();
}