shadows/framework/src/main/java/org/robolectric/shadows/ShadowPackageManager.java
@Nullable
  public ProviderInfo removeProvider(ComponentName componentName) {
    return removeComponent(
        componentName, providerFilters, p -> p.providers, (p, a) -> p.providers = a);
  }
@Nullable
  public ProviderInfo removeProvider(ComponentName componentName) {
    return removeComponent(
        componentName, providerFilters, p -> p.providers, (p, a) -> p.providers = a);
  }
Removes content provider from the package manager.

@return the removed component or {@code null} if no such component existed.