void () { myFixture.configureByText("Foo.java", """ import java.util.function.Supplier;class Foo { private static <R> void map(Supplier<R> fn) {} public static void main(String[] args) { Runnable r = null; map(() -> (true <caret>? r : r)); }}"""); final PsiElement elementAtCaret = myFixture.getFile().findElementAt(myFixture.getCaretOffset()); assertNotNull(elementAtCaret); final PsiExpression psiExpression = PsiTreeUtil.getParentOfType(elementAtCaret, PsiExpression.class); assertInstanceOf(psiExpression, PsiConditionalExpression.class); assertTrue(PsiPolyExpressionUtil.isPolyExpression(psiExpression)); }