void () { PsiField field = myClass.findFieldByName("BOOL_CONST", false); assertNotNull(field); PsiLiteralExpression initializer = (PsiLiteralExpression)field.getInitializer(); assertNotNull(initializer); assertEquals(PsiTypes.booleanType(), initializer.getType()); assertEquals(Boolean.TRUE, initializer.getValue()); assertEquals("true", initializer.getText()); assertEquals(Boolean.TRUE, field.computeConstantValue()); }