title: JUnit mocking with Mockito, EasyMock, etc
body: <p>I'm trying to mock a method of an object inside the class I'm testing.  </p>
  
  <p>For instance</p>
  
  <pre><code>class ClassToTest {
     public doSomething () {
         SomeObject a = new SomeObject ();
         a.doSomethingElse ();
     }
  }
  </code></pre>
  
  <p>Is there a way to mock the methods of the variable "a"?  I'd like doSomethingElse to do nothing during testing.  I'm currently using Mockito but I'm open to any mocking framework.</p>
  
  <p>Thanks</p>