As for mocking a singleton; this was a class with a log object. I wanted to mock the logger to verify that it is called with the correct arguments. (Yes, I can solve this by creating a function on the class, and then mock the function, but that feels redundant.)