robolectric/src/main/java/org/robolectric/Robolectric.java
@Deprecated
  public static <T extends Activity> T setupActivity(Class<T> activityClass) {
    return buildActivity(activityClass).setup().get();
  }
@Deprecated
  public static <T extends Activity> T setupActivity(Class<T> activityClass) {
    return buildActivity(activityClass).setup().get();
  }
@ Deprecated public static < T extends Activity > T setupActivity ( Class < T > activityClass ) { return buildActivity ( activityClass ) . setup ( ) . get ( ) ; }
Simulates starting activity with the given class type and returns its reference.

<p>Use {@link androidx.test.core.app.ActivityScenario} instead, which works with
instrumentation tests too.

@deprecated use {@link androidx.test.core.app.ActivityScenario}
Simulates starting activity with the given class type and returns its reference .