Loading lesson…
Level 1 · Apprentice0 XP
One translates an interface you cannot change. The other hides a crowd behind one door.
Step 1 / 5
ProblemForty files call the payment provider's SDK directly, with its own names and error types. The company switches provider. Forty files change, and tests must be rewritten.
← → step
Before this: Singleton, and why injection replaced it
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Pick a third-party library your project calls directly (HTTP client, payment, SMS). Define your own small interface for what you need from it, write one adapter, and replace two call sites. Write a fake implementation for tests.