BAEL-4750 Java 12 New Features
This commit is contained in:
parent
c6e380d798
commit
c79e7d8cbd
|
@ -12,7 +12,7 @@ public class TeeingCollectorUnitTest {
|
|||
@Test
|
||||
public void givenSetOfNumbers_thenCalculateAverage() {
|
||||
double mean = Stream.of(1, 2, 3, 4, 5)
|
||||
.collect(Collectors.teeing(Collectors.summingDouble(i -> i), Collectors.counting(), (sum, count) -> sum / count));
|
||||
.collect(Collectors.teeing(Collectors.summingDouble(i -> i), Collectors.counting(), (sum, count) -> sum / count));
|
||||
assertEquals(3.0, mean);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue