I wanted to mock out a function and make sure it has executed a certain number of times. My implementation is roughly like