Fix unit test mocking