@@ -18,19 +18,19 @@ public class IterableStreamConversionTest {
1818
1919 @ Test
2020 public void givenIterable_whenConvertedToStream_thenNotNull () {
21- String [] names = { "Testing" , "Iterable" , "conversion" , "to" , "Stream" };
21+ String [] names = {"Testing" , "Iterable" , "conversion" , "to" , "Stream" };
2222 StreamIterable <String > iterable = new StreamIterable <>(names );
2323 Assert .assertNotNull (StreamSupport .stream (iterable .spliterator (), false ));
2424 }
2525
26- @ Test
27- public void whenConvertedToList_thenCorrect () {
28- String [] names = { "Testing" , "Iterable" , "conversion" , "to" , "Stream" };
29- StreamIterable <String > iterable = new StreamIterable <>(names );
30- Stream <String > convertedStream = StreamSupport .stream (iterable .spliterator (), false );
31- List <String > collected = convertedStream .map (String ::toUpperCase ).collect (Collectors .toList ());
32- assertThat (collected , contains ("TESTING" , "ITERABLE" , "CONVERSION" , "TO" , "STREAM" ));
33- }
26+ @ Test
27+ public void whenConvertedToList_thenCorrect () {
28+ String [] names = {"Testing" , "Iterable" , "conversion" , "to" , "Stream" };
29+ StreamIterable <String > iterable = new StreamIterable <>(names );
30+ Stream <String > convertedStream = StreamSupport .stream (iterable .spliterator (), false );
31+ List <String > collected = convertedStream .map (String ::toUpperCase ).collect (Collectors .toList ());
32+ assertThat (collected , contains ("TESTING" , "ITERABLE" , "CONVERSION" , "TO" , "STREAM" ));
33+ }
3434}
3535
3636class StreamIterable <T > implements Iterable <T > {
0 commit comments