title: Mockito mocks run actual Android code in Lollipop or greater
body: <p>So I have a Database class that has a dependency that extends SQLOpenHelper and I am testing using Android instrumented tests and Mockito to mock dependencies. We are noticing that Mockito isn't actually mocking the implementations when doing <code>Mockito.mock(class)</code> instead the actual code is running and throwing null pointer exceptions as we would expect. On API 19 devices the tests run as expected and the mocks work correctly.</p>
  
  <p>Does anyone have any suggestions or things to try? I've tried real devices and emulators with similar results. Could this be a Mockito issue, or a dex-maker issue? I haven't found any information while searching for it.</p>
  
  <p>After some more testing any class I mock with Mockito actually just uses the implementation. Here are my dependencies</p>
  
  <pre><code>androidTestCompile 'org.mockito:mockito-core:1.10.19'
  androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
  </code></pre>
  
  <p>Note: This is also in a library module if that makes any difference.</p>