setModelOrService implemented for better mocking support