title: java.lang.NoSuchMethodError: org.mockito.Mockito.framework()Lorg/mockito/MockitoFramework
body: <p>I've been facing a peculiar problem. Basically, when I run my Mockito test normally i.e. 'Run as Junit Test', it gives me the following error. Can someone help me please what is my mistake?</p>
  
  <h2>The error received:</h2>
  
  <pre><code>    java.lang.NoSuchMethodError: org.mockito.Mockito.framework()Lorg/mockito/MockitoFramework;
          at org.powermock.api.mockito.mockmaker.MockMakerLoader.doLoad(MockMakerLoader.java:45)
          at org.powermock.api.mockito.mockmaker.MockMakerLoader.load(MockMakerLoader.java:36)
          at org.powermock.api.mockito.mockmaker.PowerMockMaker.&lt;init&gt;(PowerMockMaker.java:36)
          ... shortened stacktrace....
          at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
  </code></pre>
  
  <h2>The test class:</h2>
  
  <pre><code>public class ListTest {
      @Test
      public void letsMockListSize() {
          List&lt;?&gt; list= mock(List.class);
          when(list.size()).thenReturn(2);
          assertEquals(2, list.size());
      }
  }
  </code></pre>
  
  <h2>pom.xml</h2>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;junit&lt;/groupId&gt;
      &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;version&gt;4.12&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.mockito&lt;/groupId&gt;
      &lt;artifactId&gt;mockito-all&lt;/artifactId&gt;
      &lt;version&gt;1.10.19&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.hamcrest&lt;/groupId&gt;
      &lt;artifactId&gt;hamcrest-library&lt;/artifactId&gt;
      &lt;version&gt;1.3&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;   
  &lt;dependency&gt;
      &lt;groupId&gt;org.powermock&lt;/groupId&gt;
      &lt;artifactId&gt;powermock-module-junit4&lt;/artifactId&gt;
      &lt;version&gt;2.0.0-beta.5&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.powermock&lt;/groupId&gt;
      &lt;artifactId&gt;powermock-api-mockito2&lt;/artifactId&gt;
      &lt;version&gt;2.0.0-beta.5&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  </code></pre>