void () { doTest(new PerformAction() { @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) { PsiClass aClass = myJavaFacade.findClass("PropEnum", ProjectScope.getAllScope(myProject)); Assert.assertNotNull(aClass); PsiField enumConstant = aClass.findFieldByName("valueB", false); Assert.assertNotNull(enumConstant); new RenameProcessor(myProject, enumConstant, "newValueB", true, true).run(); } }); }