void () { myFixture.configureByText("Foo.java", "class Foo {" + " class Test<A>{ Test(){}}" + " {Runnable r = Test:<caret>:new;}" + "}"); final PsiElement elementAtCaret = myFixture.getFile().findElementAt(myFixture.getCaretOffset()); assertNotNull(elementAtCaret); final PsiExpression psiExpression = PsiTreeUtil.getParentOfType(elementAtCaret, PsiExpression.class); assertInstanceOf(psiExpression, PsiMethodReferenceExpression.class); assertFalse(((PsiMethodReferenceExpression)psiExpression).isExact()); }