@Test public void checkIfShowsProgressOnResume() { presenter.onResume(); verify(view, times(1)).showProgress(); }
void onResume() { if (mainView != null) { mainView.showProgress(); } findItemsInteractor.findItems(this::onFinished); }
MainPresenter { void onResume() { if (mainView != null) { mainView.showProgress(); } findItemsInteractor.findItems(this::onFinished); } }
MainPresenter { void onResume() { if (mainView != null) { mainView.showProgress(); } findItemsInteractor.findItems(this::onFinished); } MainPresenter(MainView mainView, FindItemsInteractor findItemsInteractor); }
MainPresenter { void onResume() { if (mainView != null) { mainView.showProgress(); } findItemsInteractor.findItems(this::onFinished); } MainPresenter(MainView mainView, FindItemsInteractor findItemsInteractor); void onFinished(List<String> items); MainView getMainView(); }
MainPresenter { void onResume() { if (mainView != null) { mainView.showProgress(); } findItemsInteractor.findItems(this::onFinished); } MainPresenter(MainView mainView, FindItemsInteractor findItemsInteractor); void onFinished(List<String> items); MainView getMainView();  }