title: Android methods are not mocked when using Mockito
body: <p>I'm writing a test which purpose is to test some methods in subclass of <code>Adapter</code> class (used by <code>RecyclerView</code>). To mock adapter behavior I've chosen Mockito library. </p>
  
  <p>Here's a simple test:</p>
  
  <pre><code>import android.support.v7.widget.RecyclerView.Adapter;
  
  public class TestAdapter {
  
      @Test
      public void testAdapter() throws Exception {
          Adapter adapter = Mockito.mock(Adapter.class);
  
          adapter.notifyDataSetChanged();
      }
  }
  </code></pre>
  
  <p>Nothing should happen but <code>NullPointerException</code> is thrown instead.</p>
  
  <pre><code>java.lang.NullPointerException
      at android.support.v7.widget.RecyclerView$Adapter.notifyDataSetChanged(RecyclerView.java:5380)
      at pl.toro.test.adapter.TestAdapter.testAdapter(TestAdapter.java:38)
      ...
  </code></pre>
  
  <p>I've also tried with <code>spy</code> instead of <code>mock</code></p>
  
  <pre><code>@Test
  public void testAdapterWithDoNothing() throws Exception {
      Adapter adapter = Mockito.spy(new Adapter() {...});
      doNothing().when(adapter).notifyDataSetChanged();
  }
  </code></pre>
  
  <p>But this fails at second line (notice this is just a mock setup) </p>
  
  <pre><code>java.lang.NullPointerException
      at android.support.v7.widget.RecyclerView$AdapterDataObservable.notifyChanged(RecyclerView.java:8946)
      at android.support.v7.widget.RecyclerView$Adapter.notifyDataSetChanged(RecyclerView.java:5380)
      at pl.toro.test.adapter.TestAdapter.testAdapterWithDoNothing(TestAdapter.java:59)
      ...
  </code></pre>
  
  <p>Is it possible to mock support classes with Mockito in unit tests? </p>