added more tests using mocks