Mocks an external API for testing purposes