testLib/src/main/java/com/twofortyfouram/test/provider/MockableContentProvider.java
@NonNull
    public static MockableContentProvider newMockProvider(@NonNull final Context baseContext,
            @NonNull final String authority) {
        assertNotNull(authority, "authority"); //$NON-NLS

        final MockableContentProvider mockableContentProvider = new MockableContentProvider();

        final Context mockContext = new ContentProviderMockContext(
                InstrumentationRegistry.getContext(),
                Collections.<String, ContentProvider>singletonMap(authority,
                        mockableContentProvider));

        final ProviderInfo info = new ProviderInfo();
        info.authority = authority;

        mockableContentProvider.attachInfo(mockContext, info);

        return mockableContentProvider;
    }
/**
     * Helper method to make using the {@code MockableContentProvider} less verbose in some
     * standard use cases.
     *
     * @param baseContext Base context.
     * @param authority   Content authority.
     * @return A provider with a context whose content resolver will resolve {@code authority} to
     * the returned ContentProvider.  Note: Be sure to use {@link ContentProvider#getContext()} to
     * retrieve the appropriate context for querying the {@code ContentResolver}.
     */
Helper method to make using the  MockableContentProvider less verbose in some
standard use cases.

@param baseContext Base context.
@param authority   Content authority.
@return A provider with a context whose content resolver will resolve  authority to
the returned ContentProvider.  Note: Be sure to use  ContentProvider#getContext() to
retrieve the appropriate context for querying the  ContentResolver.
Helper method to make using the MockableContentProvider less verbose in some standard use cases . @param baseContext Base context . @param authority Content authority . @return A provider with a context whose content resolver will resolve authority to the returned ContentProvider . Note : Be sure to use ContentProvider#getContext () to retrieve the appropriate context for querying the ContentResolver .
@NonNull
    public static MockableContentProvider newMockProvider(@NonNull final Context baseContext,
            @NonNull final String authority) {
        assertNotNull(authority, "authority"); 
        final MockableContentProvider mockableContentProvider = new MockableContentProvider();
        final Context mockContext = new ContentProviderMockContext(
                InstrumentationRegistry.getContext(),
                Collections.<String, ContentProvider>singletonMap(authority,
                        mockableContentProvider));
        final ProviderInfo info = new ProviderInfo();
        info.authority = authority;
        mockableContentProvider.attachInfo(mockContext, info);
        return mockableContentProvider;
    }
@ NonNull public static MockableContentProvider newMockProvider ( @ NonNull final Context baseContext , @ NonNull final String authority ) { assertNotNull ( authority , "authority" ) ; final MockableContentProvider mockableContentProvider = new MockableContentProvider ( ) ; final Context mockContext = new ContentProviderMockContext ( InstrumentationRegistry . getContext ( ) , Collections . < String , ContentProvider > singletonMap ( authority , mockableContentProvider ) ) ; final ProviderInfo info = new ProviderInfo ( ) ; info . authority = authority ; mockableContentProvider . attachInfo ( mockContext , info ) ; return mockableContentProvider ; }
Helper method to make using the {@code MockableContentProvider} less verbose in some
 standard use cases.
Helper method to make using the { @code MockableContentProvider } less verbose in some standard use cases .
//$NON-NLS