@Test
public void testACF() throws Exception {

    int n = 1000;
    double[] test_input = new double[n];
    for (int i = 0; i < n; i ++) {
        if (i % 2 == 0) {
            test_input[i] = 1;
        } else {
            test_input[i] = -1;
        }
    }
    List<Datum> data = new ArrayList<>();
    for (int i = 0; i < n; i ++) {
        double[] value = new double[1];
        value[0] = test_input[i];
        Datum d = new Datum(new ArrayList<>(), new ArrayRealVector(value));
        data.add(d);
    }
    Autocorrelation acf = new Autocorrelation(10, 0);
    acf.evaluate(data);
    double[] expected_return = {0, -0.999, 0.998, -0.997, 0.996, -0.995, 0.994, -0.993, 0.992, -0.991};
    assertArrayEquals(expected_return, acf.correlations, 1e-5);
}