void (String newClassString, PsiJavaFile psiFile, AbstractProjectViewPane pane, String expected) { PsiClass psiClass = psiFile.getClasses()[0]; VirtualFile virtualFile = psiClass.getContainingFile().getVirtualFile(); JTree tree = pane.getTree(); setBinaryContent(virtualFile, newClassString.getBytes(StandardCharsets.UTF_8)); PlatformTestUtil.waitForAlarm(600); psiClass = psiFile.getClasses()[0]; pane.select(psiClass, virtualFile, true); PlatformTestUtil.waitWhileBusy(tree); PlatformTestUtil.assertTreeEqual(tree, expected, true); }