@Test
public void testStream() {

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