void (@NotNull Set<String> expected, @NotNull Function<? super TreeTest, ? extends List<Object>> getter) { testCollectSelection(test -> { List<Object> objects = getter.apply(test); Assert.assertEquals(expected.size(), objects.size()); objects.forEach(object -> Assert.assertTrue(expected.contains((String)object))); test.done(); }); }