assertElements(ListFunctions.sort(ImmutableList.of(9, 3, 5), null), 3, 5, 9);
}
@Test
public void testSortByKey() {
Point p1 = new Point(1, 9);
Point p2 = new Point(10, 4);
Point p3 = new Point(4, 7);
Point p4 = new Point(8, 6);
assertElements(ListFunctions.sort(ImmutableList.of(p1, p2, p3, p4), "x"), p1, p3, p4, p2);
assertElements(ListFunctions.sort(ImmutableList.of(p1, p2, p3, p4), "y"), p2, p4, p3, p1);
}