MainPresenter extends AbstractMvpPresenter<Main.View, Void> implements Main.Presenter<Main.View, Void> { @Override public void updateManualFetchFabStatus(boolean isDisplayingList, boolean isFavoriteList) { if (isDisplayingList) { mView.updateManualFetchFabStatus(!isFavoriteList); } else { mView.updateManualFetchFabStatus(false); } } MainPresenter();  MainPresenter(UseCaseHandler useCaseHandler, ManuallyFetchTodaysSentenceUC fetchTodaysSentenceUseCase); @Override void fetchTodaysSentence(); @Override void onCreate(long widgetSentenceId); @Override void onStart(); @Override void updateManualFetchFabStatus(boolean isDisplayingList, boolean isFavoriteList); @Subscribe(threadMode = ThreadMode.MAIN) void updateManualFetchFabStatus(UpdateManualFetchFabEvent event); @Override void onResume(); @Override void onStop(); @Override void onBackPressed(boolean isDrawerOpen, boolean isDetailFragment, int backStackEntryCount); @Override @Subscribe(threadMode = ThreadMode.MAIN) void refreshFetchingStatus(FetchingEvent fetchingEvent); @Override void onNavigationItemSelected(int menuId); @VisibleForTesting EventBus getEventBus();  }
@Test public void testUpdateManualFetchFabStatus_FavoriteList() { mMainPresenter.updateManualFetchFabStatus(true, true); verify(mView).updateManualFetchFabStatus(false); }
@Test public void testUpdateManualFetchFabStatus_AllList() { mMainPresenter.updateManualFetchFabStatus(true, false); verify(mView).updateManualFetchFabStatus(true); }
@Test public void testUpdateManualFetchFabStatus_FavoriteDetail() { mMainPresenter.updateManualFetchFabStatus(false, true); verify(mView).updateManualFetchFabStatus(false); }
@Test public void testUpdateManualFetchFabStatus_NoneFavoriteDetail() { mMainPresenter.updateManualFetchFabStatus(false, false); verify(mView).updateManualFetchFabStatus(false); }
@Test public void testUpdateManualFetchFabStatus_UpdateEventTrue() { UpdateManualFetchFabEvent event = new UpdateManualFetchFabEvent(true); mMainPresenter.updateManualFetchFabStatus(event); verify(mView).updateManualFetchFabStatus(true); }
@Test public void testUpdateManualFetchFabStatus_UpdateEventFalse() { UpdateManualFetchFabEvent event = new UpdateManualFetchFabEvent(false); mMainPresenter.updateManualFetchFabStatus(event); verify(mView).updateManualFetchFabStatus(false); }