Mock static method with GroovyMock or similar in Spock
问题 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 thought I'd be able to get past the static call but haven't found it. For background, I'm in the process of retrofitting tests in legacy java. Refactoring is prohibited. I'm using spock-0.7 with groovy-1.8. The call to the static method is chained with an instance call in this form: public class ClassUnderTest{ public void