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