ModificationDate { public static @Nullable Date mostRecent(@Nullable Resource @NotNull... resources) { Date[] dates = new Date[resources.length]; for (int i = 0; i < resources.length; i++) { dates[i] = get(resources[i]); } return mostRecent(dates); } private  ModificationDate(); static @Nullable Date get(@Nullable Page page); static @Nullable Date get(@Nullable Resource resource); static @Nullable Date mostRecent(@Nullable Resource @NotNull... resources); static @Nullable Date mostRecent(@Nullable Page @NotNull... pages); static @Nullable Date mostRecent(@NotNull ModificationDateProvider @NotNull... dateProviders); static @Nullable Date mostRecent(Date @NotNull... dates);  }
@Test void testMostRecentModificationDateProviderArray() throws Exception { applyPageLastModified(page1, SAMPLE_CALENDAR_1); applyPageLastModified(resource2, SAMPLE_CALENDAR_2); assertEquals(SAMPLE_CALENDAR_2.getTime(), ModificationDate.mostRecent( new PageModificationDateProvider(page1), new ResourceModificationDateProvider(resource2) )); }
@Test void testMostRecentDateArray() { assertEquals(SAMPLE_CALENDAR_2.getTime(), ModificationDate.mostRecent(SAMPLE_CALENDAR_1.getTime(), SAMPLE_CALENDAR_2.getTime())); assertEquals(SAMPLE_CALENDAR_2.getTime(), ModificationDate.mostRecent(SAMPLE_CALENDAR_2.getTime(), SAMPLE_CALENDAR_1.getTime())); }
@Test void testMostRecentResourceArray() { applyLastModified(resource1, SAMPLE_CALENDAR_1); applyLastModified(resource2, SAMPLE_CALENDAR_2); assertEquals(SAMPLE_CALENDAR_2.getTime(), ModificationDate.mostRecent(resource1, resource2)); }
@Test void testMostRecentPageArray() { applyPageLastModified(page1, SAMPLE_CALENDAR_1); applyPageLastModified(page2, SAMPLE_CALENDAR_2); assertEquals(SAMPLE_CALENDAR_2.getTime(), ModificationDate.mostRecent(page1, page2)); }
@Test void testMostRecentPageArray_WithNullDate() { applyPageLastModified(page1, SAMPLE_CALENDAR_1); assertEquals(SAMPLE_CALENDAR_1.getTime(), ModificationDate.mostRecent(page1, page2)); }