check if you already defined the generate method on the mock previously. i think you can't overwrite mocked methods so you would need to build a mock just in that test, and create the strategy with that mock.