InlineToAnonymousClassProcessor () { String name = getTestName(false); @NonNls String fileName = "/refactoring/inlineToAnonymousClass/" + name + ".java"; configureByFile(fileName); PsiElement element = TargetElementUtil.findTargetElement(getEditor(), TargetElementUtil .ELEMENT_NAME_ACCEPTED | TargetElementUtil.REFERENCED_ELEMENT_ACCEPTED); assertInstanceOf(element, PsiClass.class); assertEquals(null, InlineToAnonymousClassHandler.getCannotInlineMessage((PsiClass) element)); return new InlineToAnonymousClassProcessor(getProject(), (PsiClass) element, null, false, false, false); }