A simple example how to use the Object Factory pattern for writing tests for legacy code. More informations about the Object Factory take a look at https://www.youtube.com/watch?v=inHNZ6tY-3A