title: Dependency Injection , mocking stuff from external libraries?
body: <p>I am interested in using Dependency Injection however I am confused as to how I am supposed to deal with external libs that were not designed with DI in mind.</p>
  
  <p>For example, if I have some code that constructs objects that are within the scope of my project I can use an interface and then create mock versions as well as concrete versions of these. </p>
  
  <p>However the same code might also use an external library to write to a database or call an API or whatever. The external library might only provide a concrete implementation of this.</p>
  
  <p>This means that my code will have a mixture of concrete and abstract stuff in it and will force me into testing the external library at the same time as the rest of my code.</p>
  
  <p>Should I be creating wrappers for all the external classes so that I can inject mock versions in? This seems like a lot of work.</p>