void (@NotNull Set<String> expected, @NotNull Function<? super TreeTest, ? extends List<TreePath>> getter) { testCollectSelection(test -> { List<TreePath> paths = getter.apply(test); Assert.assertEquals(expected.size(), paths.size()); paths.forEach(path -> Assert.assertTrue(expected.contains(TreeUtil.getLastUserObject(String.class, path)))); test.done(); }); }