I have a Class which has methods in it which I've to mock.
This is why I use Spy():
MyClass myClass = Spy(MyClass)
With following question: How to unit test logging error with Spock framework in groovy I could successfully get the logging message, but for this one, I'm not able to use just a normal instantiation of the class like:
MyClass myClass = new MyClass()
How is it possible to get the logging message in a Spock test, when the Class is a Spy?