DefaultDetectorSource implements DetectorSource { @Override public List<DetectorMapping> findUpdatedDetectorMappings(long timePeriod) { isTrue(timePeriod > 0, "Required: timePeriod > 0"); return client.findUpdatedDetectorMappings(timePeriod); }  @Override DetectorMatchResponse findDetectorMappings(List<Map<String, String>> metricTags); @Override List<DetectorMapping> findUpdatedDetectorMappings(long timePeriod); @Override DetectorMapping findDetectorMappingByUuid(UUID uuid); @Override DetectorContainer findDetector(UUID uuid); @Override List<UUID> findUpdatedDetectors(long timePeriod); @Override void updatedDetectorLastUsed(UUID uuid);  }
@Test public void testFindUpdatedDetectorMappings() { val results = sourceUnderTest.findUpdatedDetectorMappings(1); assertEquals(1, results.size()); }
@Test(expected = IllegalArgumentException.class) public void testFindUpdatedDetectorMappingsFail() { sourceUnderTest.findUpdatedDetectorMappings(-1); }