void () { final PsiElementFactory factory = myJavaFacade.getElementFactory(); final PsiExpression plusPrefix = factory.createExpressionFromText("+Integer.valueOf(1)", null); assertEquals(PsiTypes.intType(), plusPrefix.getType()); final PsiExpression plusBytePrefix = factory.createExpressionFromText("+Byte.valueOf(1)", null); assertEquals(PsiTypes.intType(), plusBytePrefix.getType()); final PsiStatement declaration = factory.createStatementFromText("Byte b = 1;", null); final PsiExpression plusPlusPostfix = factory.createExpressionFromText("b++", declaration); assertEquals(PsiTypes.byteType().getBoxedType(declaration), plusPlusPostfix.getType()); }