DefaultDetectorSource implements DetectorSource { @Override public void updatedDetectorLastUsed(UUID uuid) { notNull(uuid, "uuid can't be null"); client.updatedDetectorLastUsed(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 testUpdatedDetectorLastUsed() { sourceUnderTest.updatedDetectorLastUsed(DETECTOR_UUID); verify(detectorClient, times(1)).updatedDetectorLastUsed(DETECTOR_UUID); }
@Test(expected = IllegalArgumentException.class) public void tesUpdatedDetectorLastUsed_nullUuid() { sourceUnderTest.updatedDetectorLastUsed(null); }