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