mocks and tests fixed