robolectric/src/main/java/org/robolectric/Robolectric.java
@Deprecated
  public static <T extends Fragment> FragmentController<T> buildFragment(Class<T> fragmentClass) {
    return FragmentController.of(ReflectionHelpers.callConstructor(fragmentClass));
  }
@Deprecated
  public static <T extends Fragment> FragmentController<T> buildFragment(Class<T> fragmentClass) {
    return FragmentController.of(ReflectionHelpers.callConstructor(fragmentClass));
  }
Creates a FragmentController for the given fragment class.

<p>FragmentController provides low-level APIs to control its lifecycle. Please consider using
{@link androidx.fragment.app.testing.FragmentScenario} instead, which provides higher level
APIs and works with instrumentation tests too.

@deprecated Native Fragments have been deprecated in Android P. Android encourages developers
to use androidx fragments, to test these use FragmentScenario.