void (final String newName) { configureByFile(BASE_PATH + getTestName(false) + ".java"); PsiElement element = TargetElementUtil .findTargetElement(getEditor(), TargetElementUtil.ELEMENT_NAME_ACCEPTED | TargetElementUtil.REFERENCED_ELEMENT_ACCEPTED); assertNotNull(element); new RenameProcessor(getProject(), element, newName, true, true).run(); checkResultByFile(BASE_PATH + getTestName(false) + ".java.after"); }