SearchPresenter extends BasePresenter<SearchPresenter.View> { public void onTabSelected(int position) { switch (position) { case CINEMAS_TAB_POSITION : { getView().onCinemaTabSelected(); currentTabPosition = CINEMAS_TAB_POSITION; break; } case ACTORS_TAB_POSITION : { getView().onActorTabSelected(); currentTabPosition = ACTORS_TAB_POSITION; break; } } } @Inject  SearchPresenter(); @Override void initialize(); @Override void onDestroy(); void onTabSelected(int position); void onTextChanged(String query); void onClearEditTextClicked();  }
@Test public void shouldSelectCinemaPositionWhenCinemaTabSelected(){ presenter.setView(view); presenter.onTabSelected(CINEMAS_TAB_POSITION); verify(view).onCinemaTabSelected(); }
@Test public void shouldSelectActorPositionWhenActorTabSelected(){ presenter.setView(view); presenter.onTabSelected(ACTORS_TAB_POSITION); verify(view).onActorTabSelected(); }