Changed specs to use mocks