title: Mockito : How to ignore transitive dependencies
body: <p>I am using mockito for my unit tests. Consider the following snippet</p>
  
  <pre><code>ThirdPartyClass tpo = mock(ThirdPartyClass.class);
  doNothing().when(tpo).someMethod();
  </code></pre>
  
  <p><code>ThirdPartyClass</code> is from a third party jar, lets say <code>tp.jar</code>. Now <code>tp.jar</code> is not an uber jar. Here is what <code>ThirdPartyClass</code> looks like</p>
  
  <pre><code>class ThirdPartyClass
  {
      SomeOtherClass memberObject;
  
      public ThirdPartyClass(){}
  
      /*Rest of the code*/
  }
  </code></pre>
  
  <p>Now, when i try to run my unit tests, i get <code>java.lang.ClassNotFoundException</code> for <code>SomeOtherClass</code>. Remember that <code>tp.jar</code> is not an uber jar so it makes sense that <code>SomeOtherClass</code> is not in my classpath. </p>
  
  <p>But why is mockito not able to handle this transitive dependency? Is there any way to ignore all transitive dependencies? </p>