shadows/framework/src/main/java/org/robolectric/shadows/ShadowPackageManager.java
public ActivityInfo addReceiverIfNotPresent(ComponentName componentName) {
    return addComponent(
        receiverFilters,
        p -> p.receivers,
        (p, a) -> p.receivers = a,
        updateName(componentName, new ActivityInfo()),
        false);
  }
public ActivityInfo addReceiverIfNotPresent(ComponentName componentName) {
    return addComponent(
        receiverFilters,
        p -> p.receivers,
        (p, a) -> p.receivers = a,
        updateName(componentName, new ActivityInfo()),
        false);
  }
public ActivityInfo addReceiverIfNotPresent ( ComponentName componentName ) { return addComponent ( receiverFilters , p -> p . receivers , ( p , a ) -> p . receivers = a , updateName ( componentName , new ActivityInfo ( ) ) , false ) ; }
Makes sure that given receiver exists.

If the receiver doesn't exist yet, it will be created with {@code applicationInfo} set to an
existing application, or if it doesn't exist, a new package will be created.

@return existing or newly created receiver info.
Makes sure that given receiver exists .