ReportsRegistry { public static Optional<Report> findById(final int id) { return search(r -> (r.getId() == id)); } private  ReportsRegistry(); static void init(); static Set<Report> allReports(); static Optional<Report> findById(final int id); static Optional<Report> findById(final ReportId reportId);  }
@Test public void testNotFoundReport() { initReports(); final Optional<Report> byId = ReportsRegistry.findById(-100); assertFalse(byId.isPresent()); }
@Test public void testReportIsCorrectlyIdentified() { initReports(); final Optional<Report> byId = ReportsRegistry.findById(LICENSES_PER_PRODUCT_RELEASE.getId()); assertTrue(byId.isPresent()); }