@Test public void retains_order() { final Stream<Integer> stream = Streams.of(3, 2, 1); assertThat(stream.toList(), contains(3, 2, 1)); }
@Test public void retains_duplicates() { final Stream<Integer> stream = Streams.of(2, 3, 2, 1); assertThat(stream.toList(), contains(2, 3, 2, 1)); }
@Test public void converts_a_stream_to_an_equivalent_list() { final Stream<Integer> stream = Streams.of(1, 2, 3); assertThat(stream.toList(), contains(1, 2, 3)); }