@Test
public void testStream() {

    IntList list = new IntList();
    assertThat(list.stream().toArray()).isEmpty();
    list.add(10);
    list.add(5);
    assertThat(list.stream().toArray()).containsExactly(10, 5);
    list.clear();
    assertThat(list.stream().toArray()).isEmpty();
}