@Test
public void testReplaceAll() {

    IntList list = new IntList();
    list.replaceAll(o -> o + 1);
    assertThat(list.toArray()).isEmpty();
    list.add(1);
    list.add(2);
    list.replaceAll(o -> o + 1);
    assertThat(list.toArray()).containsExactly(2, 3);
}