### Question:
CloudSheetFragment extends BottomSheetDialogFragment implements View.OnClickListener { public static final boolean isCloudProviderAvailable(Context context) { PackageManager pm = context.getPackageManager(); try { pm.getPackageInfo(CloudContract.APP_PACKAGE_NAME, PackageManager.GET_ACTIVITIES); return true; } catch (PackageManager.NameNotFoundException e) { return false; } }  @Override void onCreate(@Nullable Bundle savedInstanceState); @Override void setupDialog(Dialog dialog, int style); static final boolean isCloudProviderAvailable(Context context); @Override void onClick(View v); static final String TAG_FRAGMENT; }### Answer:
@Test public void testIsCloudProviderAvailable() { assertFalse( CloudSheetFragment.isCloudProviderAvailable(ApplicationProvider.getApplicationContext())); PackageInfo pi = new PackageInfo(); pi.packageName = CloudContract.APP_PACKAGE_NAME; shadowOf(ApplicationProvider.getApplicationContext().getPackageManager()).installPackage(pi); assertTrue( CloudSheetFragment.isCloudProviderAvailable(ApplicationProvider.getApplicationContext())); }