< prev index next >

test/java/util/stream/test/org/openjdk/tests/java/util/stream/CollectorsTest.java

Print this page

        

*** 515,525 **** new GroupingByAssertion<>(classifier, HashMap.class, new MappingAssertion<>(mapper, new ToListAssertion<>()))); } ! @Test public void testFlatMappingClose() { Function<Integer, Integer> classifier = i -> i; AtomicInteger ai = new AtomicInteger(); Function<Integer, Stream<Integer>> flatMapper = i -> Stream.of(i, i).onClose(ai::getAndIncrement); Map<Integer, List<Integer>> m = Stream.of(1, 2).collect(groupingBy(classifier, flatMapping(flatMapper, toList()))); --- 515,525 ---- new GroupingByAssertion<>(classifier, HashMap.class, new MappingAssertion<>(mapper, new ToListAssertion<>()))); } ! @Test(groups = { "serialization-hostile" }) public void testFlatMappingClose() { Function<Integer, Integer> classifier = i -> i; AtomicInteger ai = new AtomicInteger(); Function<Integer, Stream<Integer>> flatMapper = i -> Stream.of(i, i).onClose(ai::getAndIncrement); Map<Integer, List<Integer>> m = Stream.of(1, 2).collect(groupingBy(classifier, flatMapping(flatMapper, toList())));
< prev index next >