**Description** If there is a class with some fields hidden and we need to access these fields inside tests, the generated code is incorrect. **To Reproduce** Launch `HiddenFieldExampleTest` or `HiddenFieldAccessModifiersTest` (you should enable testingCodeGeneration by editing lines under the TODOs) **Expected behavior** Tests passed. **Actual behavior** Generated code is incorrect (in one case it is not compilable, in the other it has wrong tests). **Additional context** This is a sub-issue for #563, look there for more information and examples