private void doRequestControlRequestTest(RequestOrResponseType toControl, PartitionId id)
      throws InterruptedException, IOException {
    List<? extends PartitionId> idsToTest;
    if (id == null) {
      idsToTest = clusterMap.getAllPartitionIds(null);
    } else {
      idsToTest = Collections.singletonList(id);
    }
    // check that everything works
    List<Response> responses = sendAndVerifyOperationRequest(toControl, idsToTest, ServerErrorCode.NoError, null, null);
    responses.forEach(Response::release);
    // disable the request
    sendAndVerifyRequestControlRequest(toControl, false, id, ServerErrorCode.NoError);
    // check that it is disabled
    responses = sendAndVerifyOperationRequest(toControl, idsToTest, ServerErrorCode.TemporarilyDisabled, false, null);
    responses.forEach(Response::release);
    // ok to call disable again
    sendAndVerifyRequestControlRequest(toControl, false, id, ServerErrorCode.NoError);
    // enable
    sendAndVerifyRequestControlRequest(toControl, true, id, ServerErrorCode.NoError);
    // check that everything works
    responses = sendAndVerifyOperationRequest(toControl, idsToTest, ServerErrorCode.NoError, null, null);
    responses.forEach(Response::release);
    // ok to call enable again
    sendAndVerifyRequestControlRequest(toControl, true, id, ServerErrorCode.NoError);
    // check that everything works
    responses = sendAndVerifyOperationRequest(toControl, idsToTest, ServerErrorCode.NoError, null, null);
    responses.forEach(Response::release);
  }
Does the test for {@link AdminRequestOrResponseType#RequestControl} by checking that
1. The request that is being disabled works
2. The disabling of the request works
3. The request disabling has taken effect
4. The enabling of the request works
5. The re-enabled request works correctly
@param toControl the {@link RequestOrResponseType} to control.
@param id the {@link PartitionId} to disable {@code toControl} on. Can be {@code null}.
@throws InterruptedException
@throws IOException
ambry-server/src/test/java/com/github/ambry/server/AmbryServerRequestsTest.java