MainPresenter implements Callback<SearchResult>, BarcodeListener { @Subscribe @SuppressWarnings("WeakerAccess") public void productDetailsFragmentDismissed(@SuppressWarnings("UnusedParameters") ProductDetailsFragmentDismissedEvent event) { viewBinder.dismissProductDetailsView(); } MainPresenter(@NonNull MainViewBinder viewBinder,
                  @NonNull ProductList productList,
                  @NonNull Api api,
                  @NonNull EventLogger logger,
                  @NonNull SessionId sessionId,
                  @NonNull Bus eventBus); static MainPresenter create(Context applicationContext, @NonNull final MainViewBinder viewBinder,
                                       @NonNull final ProductList productList,
                                       @NonNull final ProductsAdapter productsAdapter,
                                       @NonNull SessionId sessionId,
                                       @NonNull final Bus eventBus); @Override void onBarcode(String barcode, boolean fromCamera); @Override void onResponse(Call<SearchResult> call, Response<SearchResult> response); @Override void onFailure(Call<SearchResult> call, Throwable t); @Subscribe @SuppressWarnings("WeakerAccess") void productDetailsFragmentDismissed(@SuppressWarnings("UnusedParameters") ProductDetailsFragmentDismissedEvent event); @Subscribe @SuppressWarnings("WeakerAccess") void reportButtonClicked(ReportButtonClickedEvent event); void setCurrentSearchResult(SearchResult currentSearchResult); void onBackStackChange(boolean isNotBackStackEmpty); void onSupportPolaButtonClick(); void onSupportPolaFinished();  }
@Test public void testDismissDetailsView() throws Exception { presenter.productDetailsFragmentDismissed(null); verify(viewBinder).dismissProductDetailsView(); }