void (boolean canBeInvokedOnReference) { configureByFile("/refactoring/inlineToAnonymousClass/" + getTestName(false) + ".java"); PsiElement element = TargetElementUtil .findTargetElement(getEditor(), TargetElementUtil.ELEMENT_NAME_ACCEPTED | TargetElementUtil.REFERENCED_ELEMENT_ACCEPTED); PsiCall callToInline = InlineToAnonymousClassHandler.findCallToInline(getEditor()); PsiClass classToInline = (PsiClass) element; assertNull(InlineToAnonymousClassHandler.getCannotInlineMessage(classToInline)); final PsiClassType superType = InlineToAnonymousClassProcessor.getSuperType(classToInline); assertNotNull(superType); assertEquals(canBeInvokedOnReference, InlineToAnonymousClassHandler.canBeInvokedOnReference(callToInline, superType)); }