@Test
public void testComplexityCalculation2() throws IllegalArgumentException {

    SquaredBackwardDifferenceComplexity sc = new SquaredBackwardDifferenceComplexity();
    double complexity = sc.complexity(timeSeries2);
    double expectation = Math.sqrt(40);
    String message = "Calculated %f, but %f was expected";
    assertEquals(String.format(message, complexity, expectation), expectation, complexity, 0.001);
}