title: Android Unit Test giving not mocked message for a Mockito stubbed method
body: <p>I've created the following test method where I mock Settings.Secure and stub the getString method of that class.</p>
  
  <pre><code>@Test
  public void testIsDevicePostOwner() throws Exception {
      String mockDeviceId = "2c3977ad-0867-49d6-aad8-c2762f373551";
  
      Post mockedPost = mock(Post.class);
  
      Settings.Secure mockedSecure = mock(Settings.Secure.class);
  
      ContentResolver mockContentResolver = mock(ContentResolver.class);
  
      when(mockedSecure.getString(mockContentResolver, Settings.Secure.ANDROID_ID)).thenReturn(mockDeviceId);
  }
  </code></pre>
  
  <p>When I run the test I get the following error:</p>
  
  <pre><code>java.lang.RuntimeException: Method getString in android.provider.Settings$Secure not mocked.
  </code></pre>
  
  <p>Does anybody have any ideas?</p>