### Question:
AccountRepositoryVertxImpl extends AbstractRepositoryVertxImpl implements AccountRepository { @Override public Observable<Page<AccountInfo>> search(AccountSearchCriteria criteria) { Integer pageSize = criteria.getPageSize(); Integer pageNumber = criteria.getPageNumber(); String offset = criteria.getOffset(); Order order = toDto(criteria.getOrder()); AccountOrderByEnum orderBy = criteria.getOrderBy() == null ? null : AccountOrderByEnum.fromValue(criteria.getOrderBy().getValue()); String mosaicId = criteria.getMosaicId() == null ? null : criteria.getMosaicId().getIdAsHex(); Consumer<Handler<AsyncResult<AccountPage>>> callback = (handler) -> getClient() .searchAccounts(pageSize, pageNumber, offset, order, orderBy, mosaicId, handler); return exceptionHandling( call(callback) .map( page -> this.toPage( page.getPagination(), page.getData().stream() .map(this::toAccountInfo) .collect(Collectors.toList())))); } AccountRepositoryVertxImpl(ApiClient apiClient); @Override Observable<AccountInfo> getAccountInfo(Address address); @Override Observable<List<AccountInfo>> getAccountsInfo(List<Address> addresses); @Override Observable<Page<AccountInfo>> search(AccountSearchCriteria criteria);  }### Answer:
@Test public void search() throws Exception { Address address = Address.generateRandom(this.networkType); AccountDTO accountDTO = new AccountDTO(); accountDTO.setAccountType(AccountTypeEnum.NUMBER_1); accountDTO.setAddress(encodeAddress(address)); accountDTO.setSupplementalPublicKeys( new SupplementalPublicKeysDTO().node(new AccountLinkPublicKeyDTO().publicKey("abc"))); AccountInfoDTO accountInfoDTO = new AccountInfoDTO(); accountInfoDTO.setAccount(accountDTO); BigInteger startHeight = BigInteger.ONE; BigInteger totalFeesPaid = BigInteger.valueOf(2); long beneficiaryCount = 3; BigInteger rawScore = BigInteger.valueOf(4); accountDTO.addActivityBucketsItem( new ActivityBucketDTO() .startHeight(startHeight) .totalFeesPaid(totalFeesPaid) .beneficiaryCount(beneficiaryCount) .rawScore(rawScore)); mockRemoteCall(toPage(accountInfoDTO)); List<AccountInfo> resolvedAccountInfos = repository .search(new AccountSearchCriteria().orderBy(AccountOrderBy.BALANCE)) .toFuture() .get() .getData(); Assertions.assertEquals(1, resolvedAccountInfos.size()); AccountInfo resolvedAccountInfo = resolvedAccountInfos.get(0); Assertions.assertEquals(address, resolvedAccountInfo.getAddress()); Assertions.assertEquals(AccountType.MAIN, resolvedAccountInfo.getAccountType()); Assertions.assertEquals( "abc", resolvedAccountInfo.getSupplementalAccountKeys().getNode().get()); Assertions.assertEquals(1, resolvedAccountInfo.getActivityBuckets().size()); Assertions.assertEquals( startHeight, resolvedAccountInfo.getActivityBuckets().get(0).getStartHeight()); Assertions.assertEquals( totalFeesPaid, resolvedAccountInfo.getActivityBuckets().get(0).getTotalFeesPaid()); Assertions.assertEquals( beneficiaryCount, resolvedAccountInfo.getActivityBuckets().get(0).getBeneficiaryCount()); Assertions.assertEquals( rawScore, resolvedAccountInfo.getActivityBuckets().get(0).getRawScore()); }