refactored $q mocks