Lists { @SafeVarargs public static <T> void sort(Comparator<T> comparator, List<? extends T>... collections) { for (List<? extends T> collection : collections) { collection.sort(comparator); } }  static T add(Collection<T> list, T element); static List<T> subList(List<T> list, int startIndex); static ArrayList<T> subList(List<T> list, int startIndex, int endIndex); @SafeVarargs static void sort(Comparator<T> comparator, List<? extends T>... collections); static List<T> reverse(List<T> list); static List<T>[] split(List<T> list, T delimiter); @SafeVarargs static List<T> mutableOf(T... elements); static T get(List<T> list, int index);  }
@Test void sort() { List<Integer> a = Arrays.asList(3, 2, 1); List<Integer> b = Arrays.asList(3, 2, 1); Lists.sort(Comparator.naturalOrder(), a, b); List<Integer> expected = Arrays.asList(1, 2, 3); Assertions.assertEquals(expected, a); Assertions.assertEquals(expected, b); }