void () { PsiField field = myClass.findFieldByName("STRING_EXPRESSION_METHOD", false); assertNotNull(field); PsiBinaryExpression initializer = (PsiBinaryExpression)field.getInitializer(); assertNotNull(initializer); assertTrue(initializer.getType().equalsToText("java.lang.String")); assertEquals("val() + \"xxx\"", initializer.getText()); assertNull(field.computeConstantValue()); }