@Test
void forcesMarketplaceCheck() {

    final Instant now = Instant.now();
    setClock(Clock.fixed(now, Defaults.ZONE_ID));
    final Zonky zonky = harmlessZonky();
    final Loan loan = new MockLoanBuilder()
        .set(LoanImpl::setRating, Rating.D)
        .build();
    when(zonky.getAvailableLoans(any())).thenAnswer(i -> Stream.of(loan));
    final PowerTenant tenant = mockTenant(zonky);
    when(tenant.getAvailability()
        .isAvailable()).thenReturn(true);
    when(tenant.getInvestmentStrategy())
        .thenReturn(Optional.of((available, portfolio, restrictions) -> Stream.empty()));
    final OperationDescriptor<LoanDescriptor, InvestmentStrategy, Loan> d = new InvestingOperationDescriptor();
    final StrategyExecutor<LoanDescriptor, InvestmentStrategy, Loan> e = new StrategyExecutor<>(tenant, d);
    assertThat(e.get()).isEmpty();
    verify(zonky, times(1)).getLastPublishedLoanInfo();
    verify(zonky, times(1)).getAvailableLoans(any());
    assertThat(e.get()).isEmpty(); // the second time, marketplace wasn't checked but the cache was
    verify(zonky, times(2)).getLastPublishedLoanInfo();
    verify(zonky, times(1)).getAvailableLoans(any());
    setClock(Clock.fixed(now.plus(Duration.ofMinutes(61)), Defaults.ZONE_ID));
    assertThat(e.get()).isEmpty(); // after 1 minute, marketplace was force-checked
    verify(zonky, times(3)).getLastPublishedLoanInfo();
    verify(zonky, times(2)).getAvailableLoans(any());
}