Created util function for mocking requests