SparseArrayLinkedList { public void add(T e) { Objects.requireNonNull(e, "e cannot be null"); addToSparseArrayList(list, e, sparseArrayCapacity); size++; } SparseArrayLinkedList();  SparseArrayLinkedList(int sparseArrayCapacity); static long removeFromSparseArrayList(List<SparseArray<T>> sparseArrayList, Predicate<? super T> filter); static void addToSparseArrayList(List<SparseArray<T>> sparseArrayList, T e, int sparseArrayCapacity); static long clearSparseArrayList(List<SparseArray<T>> sparseArrayList, Consumer<? super T> consumer); void add(T e); long remove(Predicate<? super T> filter); long clear(Consumer<? super T> consumer); long size(); int sparseArrayCapacity(); int sparseArraysCount();  }
@Test(expected = NullPointerException.class) public void shouldFailToAddNull() { list.add(null); }