@@ -0,0 +1,1500 @@
+package com.example.android.sunshine.app.data;%0A%0Aimport android.content.ComponentName;%0Aimport android.content.pm.PackageManager;%0Aimport android.content.pm.ProviderInfo;%0Aimport android.test.AndroidTestCase;%0A%0Apublic class TestProvider extends AndroidTestCase %7B%0A%0A    public void testProviderRegistry() %7B%0A        PackageManager pm = mContext.getPackageManager();%0A%0A        // We define the component name based on the package name from the context and the%0A        // WeatherProvider class.%0A        ComponentName componentName = new ComponentName(mContext.getPackageName(),%0A                WeatherProvider.class.getName());%0A        try %7B%0A            // Fetch the provider info using the component name from the PackageManager%0A            // This throws an exception if the provider isn't registered.%0A            ProviderInfo providerInfo = pm.getProviderInfo(componentName, 0);%0A%0A            // Make sure that the registered authority matches the authority from the Contract.%0A            assertEquals(%22Error: WeatherProvider registered with authority: %22 + providerInfo.authority +%0A                    %22 instead of authority: %22 + WeatherContract.CONTENT_AUTHORITY,%0A                    providerInfo.authority, WeatherContract.CONTENT_AUTHORITY);%0A        %7D catch (PackageManager.NameNotFoundException e) %7B%0A            // I guess the provider isn't registered correctly.%0A            assertTrue(%22Error: WeatherProvider not registered at %22 + mContext.getPackageName(),%0A                    false);%0A        %7D%0A    %7D%0A%7D

Add test to see if ContentProvider is registered