Worked and fixed a complex bug. As usual, I also wrote a dozen of unit tests to make sure it worked as expected. After done, I decided to have this exercise, look at the refactor catalog, and see which method I used for this bug. I found I used Extract Interface .
You might ask what is the big deal? Everyone knows about it. Sure, the big deal is when and how to use it naturally.
Look at example at , if we know how to identify and extract the interface IBillable from the Employee class, we’ve already separate the essentials from the fluffy in that business context. That’s a very important step.
Second, what can we do with IBillable?  provides a use case of multiple classes sharing some common operations.
I will provide another example. It can be used to create a Stub class, and implement unit tests with various scenarios. Tip: Remember that this Stub class and Employee class are interchangeable.
I will leave you with imagination how you are going to move forwards from here. Have fun!