private GetRegisterLeasePResponse acquireRegisterLease(
      final long workerId, final int estimatedBlockCount) throws IOException {
    return retryRPC(() -> {
      LOG.info("Requesting lease with workerId {}, blockCount {}", workerId, estimatedBlockCount);
      return mClient.requestRegisterLease(GetRegisterLeasePRequest.newBuilder()
              .setWorkerId(workerId).setBlockCount(estimatedBlockCount).build());
    }, LOG, "GetRegisterLease", "workerId=%d, estimatedBlockCount=%d",
    workerId, estimatedBlockCount);
  }
@Test
  public void acquireRegisterLeaseFailure() {
    assertThrows(FailedToAcquireRegisterLeaseException.class,
        () -> acquireRegisterLease(false));
  }