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