Add tests using mocks and stubs