void () { PsiElementFactory factory = myJavaFacade.getElementFactory(); final PsiExpression conditional = factory.createExpressionFromText("b ? new Integer (0) : new Double(0.0)", null); assertEquals(PsiTypes.doubleType(), conditional.getType()); final PsiExpression shift = factory.createExpressionFromText("Integer.valueOf(0) << 2", null); assertEquals(PsiTypes.intType(), shift.getType()); }