@Test
public void testClassify_rightTailed() {

    val testRows = data.listIterator();
    val testRow0 = testRows.next();
    val anomalyType = AnomalyType.RIGHT_TAILED;
    val trusted = true;
    val params = new CusumDetectorParams()
            .setType(anomalyType)
            .setTargetValue(0.16)
            .setWeakSigmas(WEAK_SIGMAS)
            .setStrongSigmas(STRONG_SIGMAS)
            .setSlackParam(0.5)
            .setInitMeanEstimate(testRow0.getObserved())
            .setWarmUpPeriod(WARMUP_PERIOD);
    val detector = new CusumDetector(detectorUuid, params, trusted);
    int numDataPoints = 1;
    while (testRows.hasNext()) {
        val testRow = testRows.next();
        val observed = testRow.getObserved();
        val metricData = new MetricData(metricDefinition, observed, epochSecond);
        val result = (OutlierDetectorResult) detector.detect(metricData);
        val level = result.getAnomalyLevel();
        assertEquals(AnomalyLevel.valueOf(testRow.getLevel()), level);
        // TODO Why not apply these assertions to all rows? [WLW]
        if (numDataPoints >= WARMUP_PERIOD) {
            assertApproxEqual(testRow.getSh(), detector.getSumHigh());
            assertApproxEqual(testRow.getSl(), detector.getSumLow());
        }
        numDataPoints++;
    }
}