SortingDialogPresenterImpl implements SortingDialogPresenter { @Override public void onFavoritesSelected() { if (isViewAttached()) { sortingDialogInteractor.setSortingOption(SortType.FAVORITES); view.dismissDialog(); } } SortingDialogPresenterImpl(SortingDialogInteractor interactor); @Override void setView(SortingDialogView view); @Override void destroy(); @Override void setLastSavedOption(); @Override void onPopularMoviesSelected(); @Override void onHighestRatedMoviesSelected(); @Override void onNewestMoviesSelected(); @Override void onFavoritesSelected();  }
@Test public void onFavoritesSelected() throws Exception { presenter.onFavoritesSelected(); verify(interactor).setSortingOption(SortType.FAVORITES); }