Serious test-related question -- there is a bunch of code that relies on talking to an API that we do not control. How would YOU go about writing tests for code that relies on this API internally?

@grmpyprogrammer Occasionally simple override when I don't care (and there are few points of injection), but mostly API adapter & test double implementing my own port (could be multiple for same library).

It often comes with a bonus of encapsulating redundant arguments. Especially when API is used in different contexts (multiple specialized adapters)