ActorsPresenter extends BasePresenter<ActorsPresenter.View> { public void onDestroy() { getActorsByQuery.removeActions(); getActorsByQuery.dispose(); setView(null); } ActorsPresenter(GetActorsByQuery getActorsByQuery); @Override void initialize(); void setActors(List<Actor> actors); void onGetTextFromSearchField(String query); void onActorClicked(int actorId , int viewHolderPosition); void onDestroy();  }
@Test public void shouldUseCaseDisposeWhenPresenterDestroy(){ presenter.onDestroy(); verify(useCaseGetActorsByQueryMock).removeActions(); verify(useCaseGetActorsByQueryMock).dispose(); }