PackageListActivityPresenterImpl implements IPackageListActivityPresenter { @Override public void packageSelected(InstalledPackageHeader header) { if (mView != null) { if (mIsTwoPane) { mView.setDetailFragment(header); } else { mView.startDetailActivity(header); } } } @Inject  PackageListActivityPresenterImpl(IPackageInteractor interactor); @Override void setView(IPackageListView view); @Override void clearView(); @Override void setTwoPane(); @Override void init(); @Override void loadPackages(boolean refresh); @Override void packageSelected(InstalledPackageHeader header);  }
@Test public void testPackageSelectedSinglePane() { InstalledPackageHeader header = Mockito.mock(InstalledPackageHeader.class); mPresenter.packageSelected(header); verify(mView, times(1)).startDetailActivity(header); verify(mView, never()).setDetailFragment(header); }