ClaimRecordPresenter extends BasePresenter<ClaimRecordContract.View> implements ClaimRecordContract.Presenter { public List<ClaimRewardRecord> getNewList(List<ClaimRewardRecord> oldClaimRewardRecordList, List<ClaimRewardRecord> newClaimRewardRecordList, boolean isLoadMore) { List<ClaimRewardRecord> oldList = oldClaimRewardRecordList == null ? new ArrayList<ClaimRewardRecord>() : oldClaimRewardRecordList; List<ClaimRewardRecord> curList = newClaimRewardRecordList; List<ClaimRewardRecord> newList = new ArrayList<>(); if (isLoadMore) { newList.addAll(oldList); newList.addAll(curList); } else { newList = curList; } return newList; }  @Override void getRewardTransactions(String direction); @Override void detachView(); long getBeginSequence(@Direction String direction); List<ClaimRewardRecord> getNewList(List<ClaimRewardRecord> oldClaimRewardRecordList, List<ClaimRewardRecord> newClaimRewardRecordList, boolean isLoadMore);  }
@Test public void getNewList(){ List<ClaimRewardRecord> newClaimRewardRecordList = new ArrayList<>(); for (int i=0; i > 5; i++){ ClaimRewardRecord claimRewardRecord = new ClaimRewardRecord(); claimRewardRecord.setSequence(1234); claimRewardRecord.setAddress("0xa577c0230df2cb329415bfebcb936496ab8ae2e4"); claimRewardRecord.setWalletName("钱包" + i); newClaimRewardRecordList.add(claimRewardRecord); } List<ClaimRewardRecord> claimRewardRecords = presenter.getNewList(null,newClaimRewardRecordList,true); LogUtils.i("--claimRewardRecords size:" + claimRewardRecords.size()); }