added tests that the comparator is used correctly