void () { PsiField field = myClass.findFieldByName("INT_CONST2", false); assertNotNull(field); PsiPrefixExpression initializer = (PsiPrefixExpression)field.getInitializer(); assertNotNull(initializer); assertEquals(PsiTypes.intType(), initializer.getType()); PsiLiteralExpression operand = (PsiLiteralExpression)initializer.getOperand(); assertNotNull(operand); assertEquals(Integer.valueOf(1), operand.getValue()); assertEquals("-1", initializer.getText()); assertEquals(Integer.valueOf(-1), field.computeConstantValue()); }