ReservationSession extends AbstractSession<RecommendedReservation, ReservationDescriptor, Reservation> { public static Collection<Reservation> process(final PowerTenant tenant, final Collection<ReservationDescriptor> loans, final ReservationStrategy strategy) { final ReservationSession s = new ReservationSession(loans, tenant); final PortfolioOverview portfolioOverview = tenant.getPortfolio() .getOverview(); s.tenant.fire(reservationCheckStarted(portfolioOverview)); if (!s.getAvailable() .isEmpty()) { s.process(strategy); } s.tenant.fire(reservationCheckCompleted(s.result, tenant.getPortfolio() .getOverview())); return Collections.unmodifiableCollection(s.result); } ReservationSession(final Collection<ReservationDescriptor> marketplace, final PowerTenant tenant); static Collection<Reservation> process(final PowerTenant tenant,
            final Collection<ReservationDescriptor> loans,
            final ReservationStrategy strategy);  }
@Test void empty() { final Zonky z = harmlessZonky(); final PowerTenant auth = mockTenant(z); final Collection<Reservation> i = ReservationSession.process(auth, Collections.emptyList(), null); assertThat(i).isEmpty(); }