DefaultDetectorSource implements DetectorSource { @Override public DetectorMapping findDetectorMappingByUuid(UUID uuid) { notNull(uuid, "uuid can't be null"); return client.findDetectorMappingByUuid(uuid); }  @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 testFindDetectorMappingByUuid() { val results = sourceUnderTest.findDetectorMappingByUuid(UUID.randomUUID()); assertEquals(detectorMapping, results); }
@Test(expected = IllegalArgumentException.class) public void testFindDetectorMappingByUuidFail() { sourceUnderTest.findDetectorMappingByUuid(null); }