I have the below function to check if it is in order
public boolean order(List<String> value) {
List<String> tmp = value;
Collections.sort(tmp);
return tmp.equals(value);
}
Test:
assertTrue(route.order(Arrays.asList("a", "s", "d")));
assertFalse(route.order(Arrays.asList("a", "k", "c")));
but fail at 2nd test, why is it not false?