void (final SliceUsage usage, final Node tree) { final List<SliceUsage> children = new ArrayList<>(); boolean b = ProgressManager.getInstance().runProcessWithProgressSynchronously( () -> usage.processChildren(new CommonProcessors.CollectProcessor<>(children)), "Expanding", true, usage.getElement().getProject()); assertTrue(b); int startOffset = usage.getElement().getTextOffset(); assertEquals(message(startOffset, usage), tree.myOffset, startOffset); List<Node> expectedChildren = tree.myChildren; int size = expectedChildren.size(); assertEquals(message(startOffset, usage), size, children.size()); children.sort(UsageViewImpl.USAGE_COMPARATOR_BY_FILE_AND_OFFSET); for (int i = 0; i < children.size(); i++) { checkUsages(children.get(i), expectedChildren.get(i)); } }