@Test
void recommendationRoundedUnderMinimum() {

    final SessionInfo sessionInfo = mockSessionInfo();
    final Money minimumInvestment = sessionInfo.getMinimumInvestmentAmount();
    final Loan l = mockLoan(minimumInvestment.getValue()
        .intValue() - 1);
    final ParsedStrategy s = mock(ParsedStrategy.class);
    // next line will cause the recommendation to be rounded to 800, which will be below the minimum investment
    when(s.getMinimumInvestmentSize(eq(l.getRating()))).thenReturn(
            minimumInvestment.subtract(1));
    when(s.getMaximumInvestmentSize(eq(l.getRating())))
        .thenReturn(minimumInvestment);
    when(s.getMaximumInvestmentShareInPercent()).thenReturn(100);
    final InvestmentSizeRecommender r = new InvestmentSizeRecommender(s);
    assertThat(r.apply(l, sessionInfo)).isEqualTo(Money.ZERO);
}