void () { PsiClass psiClass = myJavaFacade.findClass("bla.Bla", GlobalSearchScope.projectScope(getProject())); ASTNode treeElement = SourceTreeToPsiMap.psiElementToTree(psiClass); renamePackage(); //assertTrue(psiClass.isValid()); SourceTreeToPsiMap.treeElementToPsi(treeElement); }