void () { myFixture.configureByText("Foo.java", """ class Foo { public static void main(String[] args) { Object obj = new Object(); String str = ""; str += args.length == 0 <caret>? obj : args[0]; }}"""); final PsiElement elementAtCaret = myFixture.getFile().findElementAt(myFixture.getCaretOffset()); assertNotNull(elementAtCaret); final PsiExpression psiExpression = PsiTreeUtil.getParentOfType(elementAtCaret, PsiExpression.class); assertInstanceOf(psiExpression, PsiConditionalExpression.class); assertFalse(PsiPolyExpressionUtil.isPolyExpression(psiExpression)); }