How to do it:
-
Identify the change point.
-
Create a class that accepts the class we are going to wrap as a constructor argument.
- If we have trouble creating the original class in a test harness, we might have to use Extract Interface on the wrapped class so that we can instantiate the wrapper.
-
Create a method on the wrapper class with tests, that implements the new behaviour.