private void sendRequestsGetResponse(FutureResult<Void> future, UndeleteManager undeleteManager, boolean advanceTime,
      boolean isQuotaRejected) {
    List<RequestInfo> requestInfoList = new ArrayList<>();
    Set<Integer> requestsToDrop = new HashSet<>();
    Set<RequestInfo> requestAcks = new HashSet<>();
    List<RequestInfo> referenceRequestInfos = new ArrayList<>();
    while (!future.isDone()) {
      undeleteManager.poll(requestInfoList, requestsToDrop);
      referenceRequestInfos.addAll(requestInfoList);

      List<ResponseInfo> responseInfoList;
      if (isQuotaRejected) {
        responseInfoList = requestInfoList.stream()
            .map(requestInfo -> new ResponseInfo(requestInfo, true))
            .collect(Collectors.toList());
      } else {
        responseInfoList = new ArrayList<>();
        try {
          responseInfoList = networkClient.sendAndPoll(requestInfoList, requestsToDrop, AWAIT_TIMEOUT_MS);
        } catch (RuntimeException | Error e) {
          if (!advanceTime) {
            throw e;
          }
        }
      }
      for (ResponseInfo responseInfo : responseInfoList) {
        RequestInfo requestInfo = responseInfo.getRequestInfo();
        assertNotNull("Request is null", requestInfo);
        if (!referenceRequestInfos.contains(requestInfo)) {
          throw new IllegalStateException("Received Response for unrecognized request");
        } else if (requestAcks.contains(requestInfo)) {
          throw new IllegalStateException("Received response more than once for a request");
        }
        requestAcks.add(requestInfo);
        RequestInfo routerRequestInfo = responseInfo.getRequestInfo();
        RequestOrResponseType type = ((RequestOrResponse) routerRequestInfo.getRequest()).getRequestType();
        switch (type) {
          case UndeleteRequest:
            undeleteManager.handleResponse(responseInfo);
            break;
          default:
            throw new IllegalStateException("Unrecognized request type: " + type);
        }
      }
      if (advanceTime) {
        time.sleep(ADVANCE_TIME_INCREMENT_MS);
      }
      requestInfoList.clear();
    }
  }
Generates {@link Properties} that includes initial configuration.
@param parallelism undelete request parallelism.
@return Properties
ambry-router/src/test/java/com/github/ambry/router/UndeleteManagerTest.java