@Test(expected = NullPointerException.class) public void nullDetectorResponseNotAllowed() { chainUnderTest.doFilter(detectorRequest, null); }
public void doFilter(@NonNull DetectorRequest request, @NonNull DetectorResponse response) { if (!filtersIterator.hasNext()) { val result = detector.detect(request.getMetricData()); response.setDetectorResult(result); } else { DetectionFilter f = filtersIterator.next(); f.doFilter(request, response, this); } }
DetectionFilterChain { public void doFilter(@NonNull DetectorRequest request, @NonNull DetectorResponse response) { if (!filtersIterator.hasNext()) { val result = detector.detect(request.getMetricData()); response.setDetectorResult(result); } else { DetectionFilter f = filtersIterator.next(); f.doFilter(request, response, this); } } }
DetectionFilterChain { public void doFilter(@NonNull DetectorRequest request, @NonNull DetectorResponse response) { if (!filtersIterator.hasNext()) { val result = detector.detect(request.getMetricData()); response.setDetectorResult(result); } else { DetectionFilter f = filtersIterator.next(); f.doFilter(request, response, this); } } DetectionFilterChain(DetectorContainer detectorContainer); }
DetectionFilterChain { public void doFilter(@NonNull DetectorRequest request, @NonNull DetectorResponse response) { if (!filtersIterator.hasNext()) { val result = detector.detect(request.getMetricData()); response.setDetectorResult(result); } else { DetectionFilter f = filtersIterator.next(); f.doFilter(request, response, this); } } DetectionFilterChain(DetectorContainer detectorContainer); void doFilter(@NonNull DetectorRequest request, @NonNull DetectorResponse response); }
DetectionFilterChain { public void doFilter(@NonNull DetectorRequest request, @NonNull DetectorResponse response) { if (!filtersIterator.hasNext()) { val result = detector.detect(request.getMetricData()); response.setDetectorResult(result); } else { DetectionFilter f = filtersIterator.next(); f.doFilter(request, response, this); } } DetectionFilterChain(DetectorContainer detectorContainer); void doFilter(@NonNull DetectorRequest request, @NonNull DetectorResponse response);  }