BAEL-4750 Java 12 New Features

This commit is contained in:
krzysztof 2020-12-23 12:48:07 +01:00
parent c6e380d798
commit c79e7d8cbd
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}