@Test
void amountsBlocked() {

    final Zonky zonky = harmlessZonky();
    final Tenant tenant = mockTenant(zonky);
    final Loan loan = new MockLoanBuilder()
        .set(LoanImpl::setRating, Rating.D)
        .set(LoanImpl::setInterestRate, Rating.D.getInterestRate())
        .build();
    Investment i = new InvestmentImpl(new InvestmentLoanDataImpl(loan), Money.from(10));
    when(zonky.getPendingInvestments()).thenReturn(Stream.of(i));
    Map<Integer, Tuple2<Rating, Money>> result = RemoteData.getAmountsBlocked(tenant);
    Assertions.assertThat(result)
        .containsOnly(Map.entry(i.getLoan()
            .getId(), Tuple.of(Rating.D, Money.from(10))));
}