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