Refactor nock mocks