void (@NotNull Map<SearchEverywhereContributor<?>, Boolean> hasMoreContributors) { hasMoreContributors.entrySet() .stream() .filter(entry -> entry.getValue()) .map(entry -> entry.getKey()) .forEach(contributor -> { List<String> list = myMap.get(contributor.getSearchProviderId()); Assert.assertNotNull("If section has MORE item it cannot be empty", list); list.add(MORE_ITEM); }); boolean set = myFinished.compareAndSet(false, true); Assert.assertTrue("More than one finish event", set); myPhaser.arrive(); }