void () { PsiJavaFile file = (PsiJavaFile)myFixture.configureByText("A.java", "class A {public static final int VALUE = ~0 >>> 1;}"); PsiClass aClass = file.getClasses()[0]; PsiField vField = aClass.getFields()[0]; Object result = JavaPsiFacade.getInstance(getProject()).getConstantEvaluationHelper().computeConstantExpression(vField.getInitializer()); assertEquals(2147483647, result); }