@@ -35,44 +35,44 @@ public void max(){
3535 String longest = places .stream ()
3636 .max (Comparator .comparing (cityName -> cityName .length ()))
3737 .get ();
38- assertEquals (longest , "" );
38+ assertEquals (longest , __ );
3939 }
4040
4141 @ Koan
4242 public void min (){
4343 String longest = places .stream ()
4444 .max (Comparator .comparing (cityName -> cityName .length ()))
4545 .get ();
46- assertEquals (longest , "" );
47- }
48-
49- @ Koan
50- public void reduceWithoutFirstElementReturnsOptional (){
51- Optional <String > join = places .stream ()
52- .reduce (String ::concat );
53- assertEquals (join .get (), "" );
46+ assertEquals (longest , __ );
5447 }
5548
5649 @ Koan
5750 public void reduce (){
5851 String join = places .stream ()
5952 .reduce ("" , String ::concat );
60- assertEquals (join , "" );
53+ assertEquals (join , __ );
54+ }
55+
56+ @ Koan
57+ public void reduceWithoutStarterReturnsOptional (){
58+ Optional <String > join = places .stream ()
59+ .reduce (String ::concat );
60+ assertEquals (join .get (), __ );
6161 }
6262
6363 @ Koan
6464 public void join (){
6565 String join = places .stream ()
6666 .reduce ((accumulated , cityName ) -> accumulated + "\" , \" " + cityName )
6767 .get ();
68- assertEquals (join , "" );
68+ assertEquals (join , __ );
6969 }
7070
7171 @ Koan
7272 public void reduceWithBinaryOperator (){
7373 String join = places .stream ()
7474 .reduce ("" , String ::concat );
75- assertEquals (join , "" );
75+ assertEquals (join , __ );
7676 }
7777
7878 @ Koan
@@ -101,12 +101,12 @@ public void parallelMapReduce(){
101101
102102 @ Koan
103103 public void limitSkip (){
104- int lengthSum_Limit_5_Skip_1 = places .stream ()
104+ int lengthSum_Limit_3_Skip_1 = places .stream ()
105105 .mapToInt (String ::length )
106- .limit (5 )
106+ .limit (3 )
107107 .skip (1 )
108108 .sum ();
109- assertEquals (lengthSum_Limit_5_Skip_1 , __ );
109+ assertEquals (lengthSum_Limit_3_Skip_1 , __ );
110110 }
111111
112112 @ Koan
0 commit comments