From Java Testing with Spock

Using mocks and stubs in a Spock test

Using mocks and stubs in a Spock test