How do you test code that depends on a third-party API?

Technical