@Test
public void sortIndexesTest() {

	double[] vector = new double[] { 4, 2, 6 };
	double[] vector2 = new double[] { 2, 4, 6 };
	List<Integer> result1 = TimeSeriesUtil.sortIndexes(vector, true);
	List<Integer> result1Inv = TimeSeriesUtil.sortIndexes(vector, false);
	Assert.assertEquals(Arrays.asList(1, 0, 2), result1);
	Assert.assertEquals(Arrays.asList(2, 0, 1), result1Inv);
	List<Integer> result2 = TimeSeriesUtil.sortIndexes(vector2, true);
	Assert.assertEquals(Arrays.asList(0, 1, 2), result2);
}