ViewModelProviders { @NonNull @MainThread public static ViewModelProvider of(@NonNull Fragment fragment) { return of(fragment, null); } @Deprecated  ViewModelProviders(); @NonNull @MainThread static ViewModelProvider of(@NonNull Fragment fragment); @NonNull @MainThread static ViewModelProvider of(@NonNull FragmentActivity activity); @NonNull @MainThread static ViewModelProvider of(@NonNull Fragment fragment, @Nullable Factory factory); @NonNull @MainThread static ViewModelProvider of(@NonNull FragmentActivity activity,
            @Nullable Factory factory);  }
@Test(expected = IllegalStateException.class) public void testNotAttachedActivity() { ViewModelProviders.of(new FragmentActivity()); }
@Test(expected = IllegalStateException.class) public void testNotAttachedFragment() { ViewModelProviders.of(new Fragment()); }