void () { configure(); PsiFile file = getFile(); Editor editor = getEditor(); PsiElement element = file.findElementAt(editor.getCaretModel().getOffset()); PsiMethodReferenceExpression methodReference = PsiTreeUtil.getParentOfType(element, PsiMethodReferenceExpression.class); assertTrue(new CreateMethodFromMethodReferenceFix(methodReference).isAvailable(getProject(), editor, file)); }