EditorialListPresenter implements Presenter { @VisibleForTesting public void handleEditorialCardClick() { view.getLifecycleEvent() .filter(lifecycleEvent -> lifecycleEvent.equals(View.LifecycleEvent.CREATE)) .flatMap(__ -> view.editorialCardClicked() .observeOn(viewScheduler) .doOnNext(click -> { editorialListAnalytics.sendEditorialInteractEvent(click.getCardId(), click.getBundlePosition()); editorialListNavigator.navigateToEditorial(click.getCardId()); }) .retry()) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(homeClick -> { }, throwable -> crashReporter.log(throwable)); } EditorialListPresenter(EditorialListView editorialListView,
      EditorialListManager editorialListManager, AptoideAccountManager accountManager,
      EditorialListNavigator editorialListNavigator, EditorialListAnalytics editorialListAnalytics,
      CrashReport crashReporter, Scheduler viewScheduler,
      UserFeedbackAnalytics userFeedbackAnalytics); @Override void present(); @VisibleForTesting void onCreateLoadViewModel(); @VisibleForTesting void loadUserImage(); @VisibleForTesting void handleEditorialCardClick(); @VisibleForTesting void handlePullToRefresh(); @VisibleForTesting void handleRetryClick(); @VisibleForTesting void handleImpressions(); @VisibleForTesting void handleBottomReached(); @VisibleForTesting void handleUserImageClick(); @VisibleForTesting void handleReactionButtonClick(); @VisibleForTesting void handleUserReaction(); @VisibleForTesting void handleSnackLogInClick();  }
@Test public void handleEditorialCardClickTest() { presenter.handleEditorialCardClick(); lifecycleEvent.onNext(View.LifecycleEvent.CREATE); cardClickEvent.onNext( new EditorialHomeEvent("1", "CURATION_1", null, 1, HomeEvent.Type.EDITORIAL)); verify(editorialListAnalytics).sendEditorialInteractEvent("1", 1); verify(editorialListNavigator).navigateToEditorial("1"); }