### Question:
MainPagerPresenter extends BasePresenter<MainPagerContract.View> implements MainPagerContract.Presenter { @Override public void loadMainPagerData() { Observable<BaseResponse<LoginData>> mLoginObservable = mDataManager.getLoginData(getLoginAccount(), getLoginPassword()); Observable<BaseResponse<List<BannerData>>> mBannerObservable = mDataManager.getBannerData(); Observable<BaseResponse<FeedArticleListData>> mArticleObservable = mDataManager.getFeedArticleList(0); addSubscribe(Observable.zip(mLoginObservable, mBannerObservable, mArticleObservable, this::createResponseMap) .compose(RxUtils.rxSchedulerHelper()) .subscribeWith(new BaseObserver<HashMap<String, Object>>(mView) { @Override public void onNext(HashMap<String, Object> map) { BaseResponse<LoginData> loginResponse = CommonUtils.cast(map.get(Constants.LOGIN_DATA)); if (loginResponse.getErrorCode() == BaseResponse.SUCCESS) { loginSuccess(loginResponse); } else { mView.showAutoLoginFail(); } BaseResponse<List<BannerData>> bannerResponse = CommonUtils.cast(map.get(Constants.BANNER_DATA)); if (bannerResponse != null) { mView.showBannerData(bannerResponse.getData()); } BaseResponse<FeedArticleListData> feedArticleListResponse = CommonUtils.cast(map.get(Constants.ARTICLE_DATA)); if (feedArticleListResponse != null) { mView.showArticleList(feedArticleListResponse.getData(), isRefresh); } } @Override public void onError(Throwable e) { super.onError(e); mView.showAutoLoginFail(); } })); } @Inject  MainPagerPresenter(DataManager dataManager); @Override void attachView(MainPagerContract.View view); @Override String getLoginAccount(); @Override String getLoginPassword(); @Override void loadMainPagerData(); @Override void autoRefresh(boolean isShowError); @Override void loadMore(); @Override void getBannerData(boolean isShowError); @Override void getFeedArticleList(boolean isShowError); @Override void loadMoreData(); @Override void addCollectArticle(int position, FeedArticleData feedArticleData); @Override void cancelCollectArticle(int position, FeedArticleData feedArticleData);  }### Answer:
@Test public void loadMainPagerDataSuccess() { login(); mMainPagerPresenter.loadMainPagerData(); Mockito.verify(mView).showAutoLoginSuccess(); Mockito.verify(mView).showBannerData(ArgumentMatchers.any()); Mockito.verify(mView).showArticleList(ArgumentMatchers.any(FeedArticleListData.class), ArgumentMatchers.eq(true)); }
@Test public void loadMainPagerDataFail() { mDataManager.setLoginAccount(""); mDataManager.setLoginPassword(""); mMainPagerPresenter.loadMainPagerData(); Mockito.verify(mView).showAutoLoginFail(); Mockito.verify(mView).showBannerData(ArgumentMatchers.any()); Mockito.verify(mView).showArticleList(ArgumentMatchers.any(FeedArticleListData.class), ArgumentMatchers.eq(true)); }