First-timer here, apologies if I\'ve missed anything. I\'m hoping to get around a call to a static method using Spock. Feedback would be great
With groovy mocks, I
The way I've gotten around static methods in Groovy/Spock is by creating proxy classes that are substituted out in the actual code. These proxy classes simply return the static method that you need. You would just pass in the proxy classes to the constructor of the class you're testing.
Thus, when you write your tests, you'd reach out to the proxy class (that will then return the static method) and you should be able to test that way.