MvvmFragment extends Fragment implements MvvmView<T, S>, FragmentDelegateCallback<T, S> { protected FragmentDelegate getMvvmDelegate() { if (delegate == null) { delegate = new FragmentDelegate<>(this, this); } return delegate; }  @Override @CallSuper void onCreate(@Nullable Bundle savedInstanceState); @Nullable @Override View onCreateView(LayoutInflater inflater,
                             @Nullable ViewGroup container,
                             @Nullable Bundle savedInstanceState); @Override @CallSuper void onResume(); @Override @CallSuper void onPause(); @Override @CallSuper void onDestroy(); @Override @CallSuper void onSaveInstanceState(Bundle outState); @NonNull @Override MvvmView<T, S> getMvvmView(); @NonNull T getBinding(); @Override @CallSuper void setBinding(@NonNull T binding); @NonNull S getViewModel(); @Override @CallSuper void setViewModel(@NonNull S viewModel);  }
@Test public void testCreateDelegateIfNotExists() { assertNotNull(getTestedFragment().getMvvmDelegate()); }
@Test public void testReturnSameDelegate() { final MvvmFragment testedFragment = getTestedFragment(); assertSame(testedFragment.getMvvmDelegate(), testedFragment.getMvvmDelegate()); }