LauncherViewModel extends WatchLaterViewModel { public LiveData<IntentResolverRepository.ResolverState> getResolverState() { return intentResolverRepository.getResolverState(); } @SuppressWarnings("WeakerAccess")  LauncherViewModel(WatchLaterApplication application); void update(); LiveData<IntentResolverRepository.ResolverState> getResolverState();  }
@SuppressWarnings("unchecked") @Test public void should_update_intentresolverstate() { LiveData<IntentResolverRepository.ResolverState> liveData = mock(LiveData.class); when(intentResolverRepository.getResolverState()).thenReturn(liveData); assertThat(viewModel.getResolverState()).isEqualTo(liveData); }