@Test
void makeInvestment() {

    // setup APIs
    final Zonky z = harmlessZonky();
    // run test
    final int amount = 200;
    final LoanDescriptor ld = mockLoanDescriptor();
    final int loanId = ld.item()
        .getId();
    final PowerTenant auth = mockTenant(z);
    final Collection<LoanDescriptor> lds = Arrays.asList(ld, mockLoanDescriptor());
    final Collection<Loan> i = InvestingSession.invest(auth, lds,
            mockStrategy(loanId, amount));
    // check that one investment was made
    assertThat(i).hasSize(1);
    final List<Event> newEvents = getEventsRequested();
    assertThat(newEvents).hasSize(4);
    assertSoftly(softly -> {
        softly.assertThat(newEvents.get(0))
            .isInstanceOf(ExecutionStartedEvent.class);
        softly.assertThat(newEvents.get(1))
            .isInstanceOf(LoanRecommendedEvent.class);
        softly.assertThat(newEvents.get(2))
            .isInstanceOf(InvestmentMadeEvent.class);
        softly.assertThat(newEvents.get(3))
            .isInstanceOf(ExecutionCompletedEvent.class);
    });
    verify(auth).setKnownBalanceUpperBound(eq(Money.from(Integer.MAX_VALUE - 200)));
}