@Test public void testBuildDetectorContainer() { val result = sourceUnderTest.findDetector(DETECTOR_UUID); assertNotNull(result); }
@Override public DetectorContainer findDetector(UUID uuid) { notNull(uuid, "uuid can't be null"); val document = client.findDetectorDocument(uuid); val detector = detectorFactory.buildDetector(document); if (detector == null) return null; val filters = DetectorDocumentParserUtil.parseFilters(document); return new DetectorContainer(detector, filters); }
DefaultDetectorSource implements DetectorSource { @Override public DetectorContainer findDetector(UUID uuid) { notNull(uuid, "uuid can't be null"); val document = client.findDetectorDocument(uuid); val detector = detectorFactory.buildDetector(document); if (detector == null) return null; val filters = DetectorDocumentParserUtil.parseFilters(document); return new DetectorContainer(detector, filters); } }
DefaultDetectorSource implements DetectorSource { @Override public DetectorContainer findDetector(UUID uuid) { notNull(uuid, "uuid can't be null"); val document = client.findDetectorDocument(uuid); val detector = detectorFactory.buildDetector(document); if (detector == null) return null; val filters = DetectorDocumentParserUtil.parseFilters(document); return new DetectorContainer(detector, filters); }  }
DefaultDetectorSource implements DetectorSource { @Override public DetectorContainer findDetector(UUID uuid) { notNull(uuid, "uuid can't be null"); val document = client.findDetectorDocument(uuid); val detector = detectorFactory.buildDetector(document); if (detector == null) return null; val filters = DetectorDocumentParserUtil.parseFilters(document); return new DetectorContainer(detector, filters); }  @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); }
DefaultDetectorSource implements DetectorSource { @Override public DetectorContainer findDetector(UUID uuid) { notNull(uuid, "uuid can't be null"); val document = client.findDetectorDocument(uuid); val detector = detectorFactory.buildDetector(document); if (detector == null) return null; val filters = DetectorDocumentParserUtil.parseFilters(document); return new DetectorContainer(detector, filters); }  @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);  }