@Test public void successfulFragmentStart() throws Exception { final TestDialogFragment testDialogFragment = spy(TestDialogFragment.class); final Bundle args = new Bundle(); final TestDialogViewModel model = new TestDialogViewModel(TestDialogViewModel.TEST_STRING); args.putSerializable(TestDialogFragment.ARG_ALERT, model); testDialogFragment.setArguments(args); FragmentTestUtil.startFragment(testDialogFragment); verify(testDialogFragment, Mockito.never()).getEmptyDialogViewModelInstance(); assertEquals(testDialogFragment.alert, model); }
abstract T getEmptyDialogViewModelInstance();
BottomAlertDialogFragment extends SenseDialogFragment { abstract T getEmptyDialogViewModelInstance(); }
BottomAlertDialogFragment extends SenseDialogFragment { abstract T getEmptyDialogViewModelInstance();  }
BottomAlertDialogFragment extends SenseDialogFragment { abstract T getEmptyDialogViewModelInstance();  void onNeutralButtonClicked(); @Override void onCreate(final Bundle savedInstanceState); @CallSuper @Nullable @Override View onCreateView(final LayoutInflater inflater,
                             final ViewGroup container,
                             final Bundle savedInstanceState); @Override Dialog onCreateDialog(final Bundle savedInstanceState); @CallSuper @Override void onSaveInstanceState(final Bundle outState); @CallSuper @Override void dismissSafely(); void showAllowingStateLoss(@NonNull final FragmentManager fm,
                                      final int containerResId,
                                      @NonNull final String tag); }
BottomAlertDialogFragment extends SenseDialogFragment { abstract T getEmptyDialogViewModelInstance();  void onNeutralButtonClicked(); @Override void onCreate(final Bundle savedInstanceState); @CallSuper @Nullable @Override View onCreateView(final LayoutInflater inflater,
                             final ViewGroup container,
                             final Bundle savedInstanceState); @Override Dialog onCreateDialog(final Bundle savedInstanceState); @CallSuper @Override void onSaveInstanceState(final Bundle outState); @CallSuper @Override void dismissSafely(); void showAllowingStateLoss(@NonNull final FragmentManager fm,
                                      final int containerResId,
                                      @NonNull final String tag); static final String TAG; }