void () { SmartList<Integer> l = new SmartList<>(0, 1); assertThat(l.toArray()).isEqualTo(new Object[]{0, 1}); assertThat(l.toArray()).isEqualTo(new Integer[]{0, 1}); assertThat(l.toArray(new Integer[0])).isEqualTo(new Integer[]{0, 1}); assertThat(l.toArray(new Integer[4])).containsExactly(0, 1, null, null); l.remove(1); checkForEach(l); assertThat(l.toArray(new Integer[4])).containsExactly(0, null, null, null); assertThat(l.toArray()).containsExactly(0); }