@Test
public void testCorrectnessForDistanceCalculation2() {

	// Input.
	double[] timeSeries1 = { 1, 2, 3, 4, 5 }; // transform will give [-6.0833, -5.6666667, -4, -0.6666667, 6.41666667]
	double[] timeSeries2 = { 2, 2, 2, 2, 2 }; // transform will give [ -4.166667, -1.666667, 0, 1.666667, 4.166667 ]
	double alpha = 0.5;
	IVectorTransform transform = new HilbertTransform();
	IDistanceMetric euclideanDistance = new EuclideanDistance();
	// Expectation.
	double expectation = Math.cos(alpha) * Math.sqrt(15) + Math.sin(alpha) * 6.79562;
	TransformDistance td = new TransformDistance(alpha, transform, euclideanDistance);
	double distance = td.distance(timeSeries1, timeSeries2);
	assertEquals(expectation, distance, 1.0E-5);
}