### Question:
StatusMessageSummaryCache implements WithTransactionScope { @Programmatic public StatusMessageSummary findFor(final InvoiceForLease invoice) { final Long invoiceId = idFor(invoice); if (invoiceId==null) return null; Optional<StatusMessageSummary> statusMessageOpt = statusMessageByInvoiceId.get(invoiceId); if (statusMessageOpt == null) { final List<InvoiceIdAndStatusMessageSummary> statusMessages = find(invoiceId); final Map<Long, Optional<StatusMessageSummary>> map = statusMessages.stream() .collect(Collectors.toMap( InvoiceIdAndStatusMessageSummary::getInvoiceId, StatusMessageSummaryCache::optionallyRecreateFrom)); statusMessageByInvoiceId.putAll(map); statusMessageOpt = statusMessageByInvoiceId.get(invoiceId); } return statusMessageOpt.orElse(null); }  @Programmatic StatusMessageSummary findFor(final InvoiceForLease invoice); @Override void resetForNextTransaction();  }### Answer:
@Test public void findFor() { StatusMessageSummaryCache service = new StatusMessageSummaryCache(){ Long idFor(final Object object) { return null; }; }; InvoiceForLease invoice = new InvoiceForLease(); Assertions.assertThat(service.findFor(invoice)).isNull(); }