MvvmDelegate { @CallSuper public void onPause() { if (viewModel != null) viewModel.onPause(); } MvvmDelegate(DelegateCallback<T, S> callback); @CallSuper void onCreate(); @CallSuper void onResume(); @CallSuper void onPause(); @CallSuper void onDestroy();  }
@Test public void testPauseViewModelOnActivityPause() { delegate.viewModel = viewModel; delegate.onPause(); verify(viewModel).onPause(); }