void () { myFixture.configureByText("Foo.java", "import java.util.*;" + "class Foo {" + " String foo(int i) {" + " return i == 0 <caret>? bar() : bar();" + " }" + " String bar() {return null;}" + "}"); final PsiElement elementAtCaret = myFixture.getFile().findElementAt(myFixture.getCaretOffset()); assertNotNull(elementAtCaret); final PsiExpression psiExpression = PsiTreeUtil.getParentOfType(elementAtCaret, PsiExpression.class); assertInstanceOf(psiExpression, PsiConditionalExpression.class); assertFalse(PsiPolyExpressionUtil.hasStandaloneForm(psiExpression)); assertTrue(PsiPolyExpressionUtil.isPolyExpression(psiExpression)); }