void (@NotNull Supplier<Visitor> supplier, @NotNull String expected) { TreeTest.test(TreeUtilVisitTest::root, test -> test.assertTree("+Root\n", () -> { @NotNull Visitor visitor = supplier.get(); TreeUtil.visit(test.getTree(), visitor, path -> { test.getTree().makeVisible(path); test.addSelection(path, () -> test.assertTree(expected, true, test::done)); }); })); }