void () { PsiField field = myClass.findFieldByName("LONG_CONST3", false); assertNotNull(field); PsiPrefixExpression initializer = (PsiPrefixExpression)field.getInitializer(); assertNotNull(initializer); assertEquals(PsiTypes.longType(), initializer.getType()); long value = -1L << 63; assertEquals(value + "L", initializer.getText()); assertEquals(Long.valueOf(value), field.computeConstantValue()); }