@Test public void testFromSameDay() { Instant instant = clock.instant(); testTimeLastUpdatedAt(instant); assertFalse(PersistenceUtil.isTestOlderThanAverage(instant, testTime)); }
static boolean isTestOlderThanAverage(Instant averageInstant, TestTime test) { if(test.getLastUpdated() == null) { return true; } Instant lastUpdated = test.getLastUpdated().toInstant(); return Duration.between(averageInstant, lastUpdated).toDays() < 0; }
PersistenceUtil { static boolean isTestOlderThanAverage(Instant averageInstant, TestTime test) { if(test.getLastUpdated() == null) { return true; } Instant lastUpdated = test.getLastUpdated().toInstant(); return Duration.between(averageInstant, lastUpdated).toDays() < 0; } }
PersistenceUtil { static boolean isTestOlderThanAverage(Instant averageInstant, TestTime test) { if(test.getLastUpdated() == null) { return true; } Instant lastUpdated = test.getLastUpdated().toInstant(); return Duration.between(averageInstant, lastUpdated).toDays() < 0; }  }
PersistenceUtil { static boolean isTestOlderThanAverage(Instant averageInstant, TestTime test) { if(test.getLastUpdated() == null) { return true; } Instant lastUpdated = test.getLastUpdated().toInstant(); return Duration.between(averageInstant, lastUpdated).toDays() < 0; }   }
PersistenceUtil { static boolean isTestOlderThanAverage(Instant averageInstant, TestTime test) { if(test.getLastUpdated() == null) { return true; } Instant lastUpdated = test.getLastUpdated().toInstant(); return Duration.between(averageInstant, lastUpdated).toDays() < 0; }    }