Fix unit test mocking.