void () { final PerformAction action = (rootDir, rootAfter) -> { final JavaPsiFacade psiFacade = JavaPsiFacade.getInstance(myProject); final PsiPackage sourcePackage = psiFacade.findPackage("pack1.pack2"); assertNotNull(sourcePackage); RenamePsiPackageProcessor.createRenameMoveProcessor("pack1", sourcePackage, false, false).run(); FileDocumentManager.getInstance().saveAllDocuments(); }; doTest(action); }