@Test
public void STLTest1() {

    constant = "2";
    constants.add(constant);
    datapoints.put(1000L, 1000.0);
    datapoints.put(2000L, 1000.0);
    datapoints.put(3000L, 1000.0);
    datapoints.put(4000L, 1000.0);
    datapoints.put(5000L, 1000.0);
    datapoints.put(6000L, 1000.0);
    datapoints.put(7000L, 1000.0);
    datapoints.put(8000L, 1000.0);
    metric.setDatapoints(datapoints);
    metrics.add(metric);
    List<Metric> transformedMetrics = anomalySTLTransform.transform(null, metrics, constants);
    Map<Long, Double> anomalyScores = transformedMetrics.get(0).getDatapoints();
    expected.put(1000L, 29.6493052);
    expected.put(2000L, 4.49420750);
    expected.put(3000L, 22.549729);
    expected.put(4000L, 17.725911);
    expected.put(5000L, 22.60506118);
    expected.put(6000L, 44.259967);
    expected.put(7000L, 32.898948);
    expected.put(8000L, 85.221552);
    assertEquals(expected.keySet(), anomalyScores.keySet());
    for (Long time : expected.keySet()) {
        assertEquals(expected.get(time), anomalyScores.get(time), 0.01);
    }
}