title: Mocking a method that uses external classes, mockito
body: <p>I'm new to mockito and just trying to understand how it works.</p>
  
  <p>I have a method that I want to test. The method instantiates multiple classes to use its methods.</p>
  
  <p>e.g.</p>
  
  <pre><code>methodToTest{
   class1 c1 = new class1();
   class2 c2 = new class2();
   class3 c4 = new class3();
  
  c1.method1;
  c2.method2;
  c3.method3;
  
  more logic 
  
  ...
  
  return result
  }
  </code></pre>
  
  <p>I understand that in order to test this method I need to mock the classes. Doe this mean I need to decouple it and pass in each class as a parameter to the method?
  I want to avoid having a method that uses a large list of parameters that will only really be necessary when mocking.</p>
  
  <p>Perhaps I've missed something.</p>
  
  <p>Thanks for your insights.</p>