@Test public void testGetAnomalies() { List<OutlierDetectorResult> actualResults = controller.getAnomalies(request); assertNotNull(actualResults); assertSame(results, actualResults); }
@PostMapping(path = "/anomalies", consumes = "application/json", produces = "application/json") public List<OutlierDetectorResult> getAnomalies(@RequestBody AnomalyRequest request) { List<OutlierDetectorResult> detectorResults = anomalyRepository.getAnomalies(request); if (detectorResults == null || detectorResults.isEmpty()) { throw new IllegalArgumentException("Invalid request: " + request); } return detectorResults; }
AnomalyController { @PostMapping(path = "/anomalies", consumes = "application/json", produces = "application/json") public List<OutlierDetectorResult> getAnomalies(@RequestBody AnomalyRequest request) { List<OutlierDetectorResult> detectorResults = anomalyRepository.getAnomalies(request); if (detectorResults == null || detectorResults.isEmpty()) { throw new IllegalArgumentException("Invalid request: " + request); } return detectorResults; } }
AnomalyController { @PostMapping(path = "/anomalies", consumes = "application/json", produces = "application/json") public List<OutlierDetectorResult> getAnomalies(@RequestBody AnomalyRequest request) { List<OutlierDetectorResult> detectorResults = anomalyRepository.getAnomalies(request); if (detectorResults == null || detectorResults.isEmpty()) { throw new IllegalArgumentException("Invalid request: " + request); } return detectorResults; }  }
AnomalyController { @PostMapping(path = "/anomalies", consumes = "application/json", produces = "application/json") public List<OutlierDetectorResult> getAnomalies(@RequestBody AnomalyRequest request) { List<OutlierDetectorResult> detectorResults = anomalyRepository.getAnomalies(request); if (detectorResults == null || detectorResults.isEmpty()) { throw new IllegalArgumentException("Invalid request: " + request); } return detectorResults; }  @PostMapping(path = "/anomalies", consumes = "application/json", produces = "application/json") List<OutlierDetectorResult> getAnomalies(@RequestBody AnomalyRequest request); }
AnomalyController { @PostMapping(path = "/anomalies", consumes = "application/json", produces = "application/json") public List<OutlierDetectorResult> getAnomalies(@RequestBody AnomalyRequest request) { List<OutlierDetectorResult> detectorResults = anomalyRepository.getAnomalies(request); if (detectorResults == null || detectorResults.isEmpty()) { throw new IllegalArgumentException("Invalid request: " + request); } return detectorResults; }  @PostMapping(path = "/anomalies", consumes = "application/json", produces = "application/json") List<OutlierDetectorResult> getAnomalies(@RequestBody AnomalyRequest request);  }