Humble object

The Humble Object Pattern is used to separate code that is hard to test from code that is easy to test. We typically apply this at the boundary where we interact with code we don’t own. For example a framework. We make our own code testable by moving the code that interacts with the third party code to a humble object. It does so little we don’t have to test it.

Only Mock Types You Own

The code on my GitHub