Allow delegate to be mocked