adapted 3 unit tests to use mocks