void (AnalysisScope scope, String expectedLeftTree, String expectedRightTree) { DependenciesBuilder builder = new ForwardDependenciesBuilder(myProject, scope); builder.analyze(); DependenciesPanel dependenciesPanel = new DependenciesPanel(myProject, builder); try { JTree leftTree = dependenciesPanel.getLeftTree(); PlatformTestUtil.expandAll(leftTree); PlatformTestUtil.assertTreeEqual(leftTree, expectedLeftTree, true); JTree rightTree = dependenciesPanel.getRightTree(); PlatformTestUtil.expandAll(rightTree); PlatformTestUtil.assertTreeEqual(rightTree, expectedRightTree, true); } finally { Disposer.dispose(dependenciesPanel); } }