Adding mocks & fixing tests