EditorialListPresenter implements Presenter { @VisibleForTesting void handleLongPressReactionButton() { view.getLifecycleEvent() .filter(lifecycleEvent -> lifecycleEvent.equals(View.LifecycleEvent.CREATE)) .flatMap(created -> view.reactionButtonLongPress()) .doOnNext(editorialHomeEvent -> { showReactions(editorialHomeEvent); }) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(lifecycleEvent -> { }, crashReporter::log); } 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 handleReactionButtonLongPressTest() { presenter.handleLongPressReactionButton(); lifecycleEvent.onNext(View.LifecycleEvent.CREATE); reactionButtonLongPressEvent.onNext( new EditorialHomeEvent("1", GROUP_ID, null, 1, HomeEvent.Type.REACT_LONG_PRESS)); verify(editorialListAnalytics).sendReactionButtonClickEvent(); verify(view).showReactionsPopup("1", GROUP_ID, 1); }