robolectric/src/main/java/org/robolectric/Robolectric.java
public static <T extends Activity> ActivityController<T> buildActivity(Class<T> activityClass) {
    return buildActivity(activityClass, null);
  }
public static <T extends Activity> ActivityController<T> buildActivity(Class<T> activityClass) {
    return buildActivity(activityClass, null);
  }
Creates a ActivityController for the given activity class.

<p>Consider using {@link androidx.test.core.app.ActivityScenario} instead, which provides
higher-level, streamlined APIs to control the lifecycle and it works with instrumentation tests
too.