/** * Set up for the AnomalyScoreCalculationFilterTest. * * @throws IllegalStateException * If illegal state * @throws AnalysisConfigurationException * If wrong configuration */ @Before public void setUp() throws IllegalStateException, AnalysisConfigurationException { this.controller = new AnalysisController(); // READER final Configuration readerScoreCalcConfiguration = new Configuration(); readerScoreCalcConfiguration.setProperty(ListReader.CONFIG_PROPERTY_NAME_AWAIT_TERMINATION, Boolean.TRUE.toString()); final ListReader<ForecastMeasurementPair> theReaderScoreCalc = new ListReader<>(readerScoreCalcConfiguration, this.controller); theReaderScoreCalc.addAllObjects(this.createInputEventSetScoreCalc()); final Configuration scoreConfiguration = new Configuration(); final AnomalyScoreCalculationFilter scoreCalc = new AnomalyScoreCalculationFilter(scoreConfiguration, this.controller); // SINK 1 this.sinkAnomalyScore = new ListCollectionFilter<>(new Configuration(), this.controller); // CONNECTION this.controller .connect(theReaderScoreCalc, ListReader.OUTPUT_PORT_NAME, scoreCalc, AnomalyScoreCalculationFilter.INPUT_PORT_CURRENT_FORECAST_PAIR); this.controller .connect(scoreCalc, AnomalyScoreCalculationFilter.OUTPUT_PORT_ANOMALY_SCORE, this.sinkAnomalyScore, ListCollectionFilter.INPUT_PORT_NAME); }
final AnomalyScoreCalculationFilter scoreCalc = new AnomalyScoreCalculationFilter(scoreConfiguration, this.controller);