title: PowerMock static class does not mock
body: <pre><code>public class TestStatic {
      public static int methodstatic(){
          return 3;
      }
  }
  
  
  @Test
  @PrepareForTest({TestStatic.class})
  public class TestStaticTest extends PowerMockTestCase {
  
      public void testMethodstatic() throws Exception {
          PowerMockito.mock(TestStatic.class);
          Mockito.when(TestStatic.methodstatic()).thenReturn(5);
          PowerMockito.verifyStatic();
          assertThat("dff",TestStatic.methodstatic()==5);
      }
  
      @ObjectFactory
      public IObjectFactory getObjectFactory() {
          return new org.powermock.modules.testng.PowerMockObjectFactory();
      }
  }
  </code></pre>
  
  <p>The exception :</p>
  
  <pre><code>org.mockito.exceptions.misusing.MissingMethodInvocationException: 
  when() requires an argument which has to be 'a method call on a mock'.
  For example:
      when(mock.getArticles()).thenReturn(articles);
  
  Also, this error might show up because:
  1. you stub either of: final/private/equals()/hashCode() methods.
  Those methods *cannot* be stubbed/verified.
  2. inside when() you don't call method on mock but on some other object.
  </code></pre>
  
  <p>I am running it through Intellij, the legacy code has plenty of methods...</p>
  
  <p>Someone has and idea, I went through the official tuto, no mean to make this simple test working</p>