void () { setupLoadingFilter(); PsiClass enumClass = findClass("enums.OurEnumWithConstantsAndStaticFields2"); PsiField[] fields = enumClass.getFields(); assertTrue(fields[0] instanceof PsiEnumConstant); assertTrue(fields[1] instanceof PsiEnumConstant); assertTrue(fields[2] instanceof PsiEnumConstant); assertFalse(fields[3] instanceof PsiEnumConstant); tearDownLoadingFilter(); assertEquals("public static final int A1 = 10;", fields[3].getText()); enumClass.accept(new JavaRecursiveElementWalkingVisitor(){ @Override public void visitReferenceExpression(@NotNull PsiReferenceExpression expression) { visitExpression(expression); } }); enumClass.getText(); }