unit test with mocks