title: EasyMock with withConstructor ignoring addMockedMethod called within constructor
body: <p>I want to test a method of a class. 
  For that I need to mock another method of the class, which is been called from the constructor. 
  Also I've to pass mocked object to the constructor. 
  When I'm not using withConstructor, it is picking addMockedMethod correctly. 
  But whenever I'm using withConstructor, it is not using the method passed in addMockedMethod anymore. (getting the exception for the following code)
  Is there anything I can do here to solve this? Following is the code</p>
  
  <p>Main Class:</p>
  
  <pre><code>public class A {
     B b;
     C c;
     public A (B _b) {
        b = _b;
        c = getC();
     }
     public void run (String _val) {
       String val = b.getValue();
       //do something
     }
     public static C getC() {
       StaticD.getC();
     }
  }
  public class StaticD {
     public static C getC() {
        throw new RuntimeException("error");
     }
  }
  </code></pre>
  
  <p>Test Class:</p>
  
  <pre><code>@Test(testName = "ATest")
  public class ATest  extends EasyMockSupport {
    public void testRun() {
       B bMock = createMock(B.class);
       expect(bMock.getValue()).andReturn("test");
       replayAll();
       A obj = createMockBuilder(A.class).
          addMockedMethod("getC").
          withConstructor(bMock).
          createMock();
       obj.run();
       verifyAll();
       resetAll();
    }
  </code></pre>