shadows/framework/src/main/java/org/robolectric/shadows/ShadowContextWrapper.java
public void removeSystemService(String name) {
    ((ShadowContextImpl) Shadow.extract(realContextWrapper.getBaseContext()))
        .removeSystemService(name);
  }
public void removeSystemService(String name) {
    ((ShadowContextImpl) Shadow.extract(realContextWrapper.getBaseContext()))
        .removeSystemService(name);
  }
Makes {@link Context#getSystemService(String)} return {@code null} for the given system service
name, mimicking a device that doesn't have that system service.