@Test
public void testComplexityCalculation() throws IllegalArgumentException {

    StretchingComplexity sc = new StretchingComplexity();
    double complexity = sc.complexity(timeSeries1);
    double expectation = 5;
    String message = "Calculated %f, but %f was expected";
    assertEquals(String.format(message, complexity, expectation), expectation, complexity, 0.001);
}