title: Mocking static method doesn't work in newer mockito-core version
body: <p>I'm experiencing strange error while changing <code>mockito-core</code> version. My code:</p>
  
  <pre><code>import org.junit.After;
  import org.junit.Before;
  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.powermock.api.mockito.PowerMockito;
  import org.powermock.core.classloader.annotations.PrepareForTest;
  import org.powermock.modules.junit4.PowerMockRunner;
  import org.powermock.reflect.Whitebox;
  import static org.mockito.Mockito.validateMockitoUsage;
  import static org.powermock.api.mockito.PowerMockito.doNothing;
  import static org.powermock.api.mockito.PowerMockito.doReturn;
  import static org.powermock.api.mockito.PowerMockito.mock;
  import static org.powermock.api.mockito.PowerMockito.mockStatic;
  import static org.powermock.api.mockito.PowerMockito.verifyPrivate;
  import static org.powermock.api.mockito.PowerMockito.when;
  import static org.powermock.api.support.membermodification.MemberMatcher.method;
  
  @RunWith(PowerMockRunner.class)
  @PrepareForTest(value = App.class)
  public class TestClass {
      @Before
      public void setup() {
          mockStatic(App.class);
          when(App.getInstance()).thenReturn(mock(App.class));
      }
  
      // tests
  }
  </code></pre>
  
  <p>Mocking <code>App.getInstance()</code> works fine when i'm using </p>
  
  <pre><code>    testImplementation group:'org.mockito',name:'mockito-core',version:'2.23.0'
  </code></pre>
  
  <p>But changing that to newest version</p>
  
  <pre><code>testImplementation group: 'org.mockito', name: 'mockito-core', version: '2.28.2'
  </code></pre>
  
  <p>Gives me error </p>
  
  <pre><code>org.mockito.exceptions.misusing.NotAMockException: Argument should be a mock, but is: class java.lang.Class
  </code></pre>
  
  <p>On line <code>when(App.getInstance()).thenReturn(mock(App.class));</code></p>
  
  <p>My build.gradle mockito part:</p>
  
  <pre><code>testImplementation group: 'org.mockito', name: 'mockito-core', version: '2.28.2'
  testImplementation group: 'org.powermock', name: 'powermock-module-junit4', version: '2.0.2'
  testImplementation group: 'org.powermock', name: 'powermock-api-mockito2', version: '2.0.2'
  </code></pre>
  
  <p>Could anyone provide any ideas why changing <code>mockito-core</code> is causing this issue?</p>