void (final Object rootElement, final AbstractTreeStructure structure, Function<? super AbstractTreeNode<?>, VirtualFile[]> converterFunction) { MultiValuesMap<VirtualFile, AbstractTreeNode<?>> map = new MultiValuesMap<>(); collect((AbstractTreeNode)rootElement, map, structure, converterFunction); for (VirtualFile eachFile : map.keySet()) { Collection<AbstractTreeNode<?>> nodes = map.values(); for (final AbstractTreeNode node : nodes) { ProjectViewNode eachNode = (ProjectViewNode)node; boolean actual = eachNode.contains(eachFile); boolean expected = map.get(eachFile).contains(eachNode); if (actual != expected) { Assert.fail("file=" + eachFile + "\n node=" + eachNode.getTestPresentation() + " expected:" + expected); } } } }