Lists { public static <T> @Nullable T get(List<T> list, int index) { return index > -1 && index < list.size() ? list.get(index) : null; }  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 get() { Assertions.assertEquals(3, LIST.size()); Assertions.assertAll( () -> Assertions.assertNotNull(Lists.get(LIST, 0)), () -> Assertions.assertNotNull(Lists.get(LIST, 2)), () -> Assertions.assertNull(Lists.get(LIST, -1)), () -> Assertions.assertNull(Lists.get(LIST, 3)) ); }