@Test
public void testCorrectnessForDistanceCalculation3() {

	// Input.
	double[] timeSeries5 = { 1, 1, 2, 2, 3, 5 }; // distance with d(x,y) = |x-y| is 1
	double[] timeSeries6 = { 1, 2, 3, 5, 5, 5, 6 };
	// Expectation.
	double expectation = 1;
	DynamicTimeWarping dtw = new DynamicTimeWarping();
	double distance = dtw.distance(timeSeries5, timeSeries6);
	assertEquals(expectation, distance, 1.0E-5);
}