title: java.lang.IllegalStateException: no last call on a mock available for static method
body: <p>im new to junit mocking. and im trying to mock below line.</p>
  
  <pre><code>IsomeInterface someinterface = someClass.getInstance();
  </code></pre>
  
  <p>where <code>someClass</code> is implementation of <code>IsomeInterface</code>.
  and <code>getInstance</code> is a static method which returns <code>someClass</code> object.
  below is the mocking i tried.</p>
  
  <pre><code>someClass someClassMock= PowerMock.createMock(someClass.class);
  EasyMock.expect(someClass.getInstance()).andReturn(someClassMock);
  </code></pre>
  
  <p>exception:</p>
  
  <pre><code>java.lang.IllegalStateException: no last call on a mock available
      at org.easymock.EasyMock.getControlForLastCall(EasyMock.java:560)
      at org.easymock.EasyMock.expect(EasyMock.java:538)
  </code></pre>