Write a test suite for an API integration, demonstrating how you mock external network dependencies and handle edge-case failures.