title: How to test class using content resolver/provider?
body: <p>I'm trying to test class that queries content resolver.</p>
  
  <p>I would like to use <code>MockContentResolver</code> and mock <code>query</code> method. </p>
  
  <p>The problem is that this method is final. What should I do? Use mocking framework? Mock other class? Thanks in advance.</p>
  
  <pre><code>public class CustomClass {
  
      private ContentResolver mContentResolver;
  
      public CustomClass(ContentResolver contentResolver) {
          mContentResolver = contentResolver;
      }
  
      public String getConfig(String key) throws NoSuchFieldException {
          String value = null;
  
              Cursor cursor = getContentResolver().query(...);
              if (cursor.moveToFirst()) {
                  //...
              }
          //..
      }
  }
  </code></pre>