When mocking some classes with Spock in one of the usual ways, we often may need to include cglib. We also have to add objensis as well.
In one our modules, the latter was removed, leading to the below type of error that did not directly point out the cause:
For our mocking, we would define the mock at the field level like:
After adding objenesis, the error was resolved: