Fix issue with unit test mocking.