title: Setting up Powemockito for static mocking
body: <p>I would like to make use of Powermock with Mockito to mock some static method calls.  I have followed instructions and examples from SO as well as the PowerMock <a href="https://code.google.com/p/powermock/wiki/GettingStarted">Getting Started</a> and <a href="https://code.google.com/p/powermock/wiki/MockStatic">MockStatic</a> pages as best I can, but I am yet to complete a mockStatic() call.</p>
  
  <p>When I call mockStatic(foo.class) from my test class, I'm given the excception:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: org/Mockito/mock/MockName
  at org.powermock.api.mockito.PowerMockito.mockStatic(PowerMockito.java:70)
  at ...my test class method call...
  </code></pre>
  
  <p>I'm sure this is a setup problem, as I have been finding the terminology used for setting this up to be pretty confusing.  I did grab the Mockito Zip from the PowerMock <a href="https://code.google.com/p/powermock/downloads/list">downloads</a>.  In Eclipse (3.5.2) I opened the project properties and added all of the Jars to the build path.  I also tried adding the entire unzipped powermockito folder to my environment vars classpath, and then just the powermockito jar specifically when that didn't work out.</p>
  
  <p>I have these annotationsat the class-level of my test class as well, per the powermock instructions:</p>
  
  <pre><code>@RunWith(PowerMockRunner.class)
  @PrepareForTest(ApplicationContextLoader.class)
  </code></pre>
  
  <p>Also these powermock-specific imports:</p>
  
  <pre><code>import org.powermock.api.mockito.PowerMockito;
  import org.powermock.core.classloader.annotations.PrepareForTest;
  import org.powermock.modules.junit4.PowerMockRunner;
  </code></pre>
  
  <p>To those of you who have used PowerMockito before, even just a pointer in the right direction, or something to check would be really helpful.  I'm struggling to see how my setup differs from that of posts I have seen using - from what I can tell - the same syntax.</p>