void () { myModel.addFlter(new Filter() { @Override @NotNull public ActionPresentation getPresentation() { throw new RuntimeException(); } @Override @NotNull public String getName() { throw new RuntimeException(); } @Override public boolean isVisible(TreeElement treeNode) { return !treeNode.toString().contains("a"); } @Override public boolean isReverted() { return false; } }); assertStructureEqual(""" root .Group:b ..Group:d ...bcd ....Group:b .....bhg_yt ..Group:f ...bft ....ttt .Group:d ..eed ...zzz .xxx .xxx """, PlatformTestUtil.createComparator(myPrintInfo)); }