Ejemplo n.º 1
0
 @Test
 public void retains_order() {
   final Stream<Integer> stream = Streams.of(3, 2, 1);
   assertThat(stream.toList(), contains(3, 2, 1));
 }
Ejemplo n.º 2
0
 @Test
 public void retains_duplicates() {
   final Stream<Integer> stream = Streams.of(2, 3, 2, 1);
   assertThat(stream.toList(), contains(2, 3, 2, 1));
 }
Ejemplo n.º 3
0
 @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));
 }