DefaultDetectorSource implements DetectorSource { @Override public DetectorMatchResponse findDetectorMappings(List<Map<String, String>> metricTags) { notNull(metricTags, "metricTags can't be null"); return client.findMatchingDetectorMappings(metricTags); }  @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 testFindDetectorMappings() { val result = sourceUnderTest.findDetectorMappings(metricTags); assertSame(detectorMatchResponse, result); }
@Test(expected = IllegalArgumentException.class) public void testFindDetectorMappings_nullTags() { sourceUnderTest.findDetectorMappings(null); }