void () { PsiField field = myClass.findFieldByName("LONG_CONST2", false); assertNotNull(field); PsiLiteralExpression initializer = (PsiLiteralExpression)field.getInitializer(); assertNotNull(initializer); assertEquals(PsiTypes.longType(), initializer.getType()); assertEquals(Long.valueOf(1000000000000L), initializer.getValue()); assertEquals("1000000000000L", initializer.getText()); assertEquals(Long.valueOf(1000000000000L), field.computeConstantValue()); }