void () { myFixture.configureByText("Foo.java", "import java.util.*;" + "class Foo {" + " <T> T bar() {return null;}" + " void foo() {" + " String[] a = new String[] {ba<caret>r()};" + " }" + "}"); final PsiElement elementAtCaret = myFixture.getFile().findElementAt(myFixture.getCaretOffset()); assertNotNull(elementAtCaret); final PsiExpression psiExpression = PsiTreeUtil.getParentOfType(elementAtCaret, PsiMethodCallExpression.class); assertInstanceOf(psiExpression, PsiMethodCallExpression.class); assertTrue(PsiPolyExpressionUtil.isPolyExpression(psiExpression)); }