Selling implements TenantPayload { @Override public void accept(final Tenant tenant) { var canAccessSmp = tenant.getSessionInfo() .canAccessSmp(); if (canAccessSmp) { tenant.getSellStrategy() .ifPresentOrElse(s -> sell((PowerTenant) tenant, s), () -> LOGGER.debug("Not selling anything as selling strategy is missing.")); } else { LOGGER.debug("Access to marketplace disabled by Zonky."); } }  @Override void accept(final Tenant tenant);  }
@Test void noSaleDueToNoStrategy() { new Selling().accept(mockTenant()); final List<Event> e = getEventsRequested(); assertThat(e).hasSize(0); }