added some mocks and tests