SmallCinemasPresenter extends BasePresenter<SmallCinemasPresenter.View> { @Override public void initialize() { getView().showLoading(); useCaseGetCinemaByQuery.subscribe(smallCinemaSubscriber); useCaseGetCinemaByQuery.setActions(new Actions( () -> getView().showLoading() , () -> getView().hideLoading() , () -> getView().clearAdapter() )); getView().hideLoading(); } SmallCinemasPresenter(GetCinemaByQuery useCaseGetCinemaByQuery); @Override void initialize(); @Override void onDestroy(); void setCinemas(List<Cinema> cinemaList); void onCinemaClicked(int cinemaId , int viewHolderPosition);  }
@Test public void shouldShowLoadingWhenInitialize(){ presenter.setView(view); presenter.initialize(); verify(view , times(1)).showLoading(); verify(view , times(1)).hideLoading(); }