@Test public void testGetLastUpdatedDetectors() { List<DetectorDocument> actualDetectors = repoUnderTest.getLastUpdatedDetectors("", ""); assertNotNull(actualDetectors); assertCheck(actualDetectors); }
@Override public List<DetectorDocument> getLastUpdatedDetectors(long interval) { Instant now = DateUtil.now().toInstant(); String fromDate = DateUtil.toUtcDateString((now.minus(interval, ChronoUnit.SECONDS))); String toDate = DateUtil.toUtcDateString(now); return getLastUpdatedDetectors(fromDate, toDate); }
LegacyDetectorRepositoryImpl implements LegacyDetectorRepository { @Override public List<DetectorDocument> getLastUpdatedDetectors(long interval) { Instant now = DateUtil.now().toInstant(); String fromDate = DateUtil.toUtcDateString((now.minus(interval, ChronoUnit.SECONDS))); String toDate = DateUtil.toUtcDateString(now); return getLastUpdatedDetectors(fromDate, toDate); } }
LegacyDetectorRepositoryImpl implements LegacyDetectorRepository { @Override public List<DetectorDocument> getLastUpdatedDetectors(long interval) { Instant now = DateUtil.now().toInstant(); String fromDate = DateUtil.toUtcDateString((now.minus(interval, ChronoUnit.SECONDS))); String toDate = DateUtil.toUtcDateString(now); return getLastUpdatedDetectors(fromDate, toDate); }  }
LegacyDetectorRepositoryImpl implements LegacyDetectorRepository { @Override public List<DetectorDocument> getLastUpdatedDetectors(long interval) { Instant now = DateUtil.now().toInstant(); String fromDate = DateUtil.toUtcDateString((now.minus(interval, ChronoUnit.SECONDS))); String toDate = DateUtil.toUtcDateString(now); return getLastUpdatedDetectors(fromDate, toDate); }  @Override UUID createDetector(DetectorDocument document); @Override void deleteDetector(String uuid); @Override void updateDetector(String uuid, DetectorDocument document); @Override DetectorDocument findByUuid(String uuid); @Override List<DetectorDocument> findByCreatedBy(String user); @Override void toggleDetector(String uuid, Boolean enabled); @Override void trustDetector(String uuid, Boolean trusted); @Override List<DetectorDocument> getLastUpdatedDetectors(long interval); @Override List<DetectorDocument> getLastUpdatedDetectors(String fromDate, String toDate); }
LegacyDetectorRepositoryImpl implements LegacyDetectorRepository { @Override public List<DetectorDocument> getLastUpdatedDetectors(long interval) { Instant now = DateUtil.now().toInstant(); String fromDate = DateUtil.toUtcDateString((now.minus(interval, ChronoUnit.SECONDS))); String toDate = DateUtil.toUtcDateString(now); return getLastUpdatedDetectors(fromDate, toDate); }  @Override UUID createDetector(DetectorDocument document); @Override void deleteDetector(String uuid); @Override void updateDetector(String uuid, DetectorDocument document); @Override DetectorDocument findByUuid(String uuid); @Override List<DetectorDocument> findByCreatedBy(String user); @Override void toggleDetector(String uuid, Boolean enabled); @Override void trustDetector(String uuid, Boolean trusted); @Override List<DetectorDocument> getLastUpdatedDetectors(long interval); @Override List<DetectorDocument> getLastUpdatedDetectors(String fromDate, String toDate);  }