title: VerifyError using Mockito 1.9.5 and DexMaker-Mockito-1.0
body: <p>Like many others I was excited to hear that <a href="http://corner.squareup.com/2012/10/mockito-android.html" rel="noreferrer">Mockito now works with Android</a> and followed <a href="http://www.paulbutcher.com/2012/05/mockito-on-android-step-by-step" rel="noreferrer">this tutorial</a> to see it with my own eyes. Everything seemed fan-flapping-tastic and I got underway incorporating the mocking solution into my Android Test Project...</p>
  
  <h3>The error</h3>
  
  <p>However, on setting up my application's test project to leverage the <code>mockito-all-1.9.5</code>, <code>dexmaker-1.0</code> and <code>dexmaker-mockito-1.0</code> jars I encountered a problem with my very first test case. Precisely <a href="http://code.google.com/p/dexmaker/issues/detail?id=16" rel="noreferrer">this problem</a> in fact. The part that I would like assistance on is;</p>
  
  <pre><code>Caused by: java.lang.VerifyError: org/mockito/cglib/core/ReflectUtils
  at org.mockito.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:167)
  at org.mockito.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
  at org.mockito.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:217)
  at org.mockito.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
  at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:117)
  at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:109)
  at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:105)
  at org.mockito.cglib.proxy.Enhancer.&lt;clinit&gt;(Enhancer.java:70)
  </code></pre>
  
  <p>I have been informed that this "simply doesn't quite work yet" since the stack trace implies that the DexMaker jar is not being used - reference <a href="http://code.google.com/p/dexmaker/issues/detail?id=16#c3" rel="noreferrer">this response</a>. However, I am suspicious that I am doing something wrong with respect to my project set-up so I'm looking to draw from the collective knowledge base here to see if indeed this is user error or a beta-bug.</p>
  
  <h3>My Android Test Project set-up</h3>
  
  <p>Please find below a screenshot of my test project's configuration. The project was created via the Android Wizard and shares no special features other than the inclusion of the Mockito and DexMaker jars (mentioned above) under the <code>libs</code> directory.</p>
  
  <p><img src="https://i.stack.imgur.com/O6VqW.png" alt="Test Project Configuration"></p>
  
  <h3>The Test</h3>
  
  <p>Never mind the content of the test (the test fails before the unit test is executed) the set-up is as described below;</p>
  
  <pre><code>public class TestSpotRatingCalculator extends InstrumentationTestCase {
    @Mock
    private AService aService; // Changed the service names being used here - not important.
    @Mock
    private BService bService;
    @Mock
    private CService cService;
    @Mock
    private DService dService;
  
    /**
     * @see android.test.AndroidTestCase#setUp()
     */
    @Override
    protected void setUp() throws Exception {
      super.setUp();
      MockitoAnnotations.initMocks(this);  // Failure here with aforementioned stacktrace...
    }
  </code></pre>
  
  <p>If anyone out there has an idea what is wrong then please sound-off here.</p>