public void blockAllOperations() {
    if (blocking) {
      throw new IllegalStateException("Already in blocking state");
    } else {
      blocking = true;
      blockLatch = new CountDownLatch(1);
    }
  }
All operations block until {@link #releaseAllOperations()} is called.
@throws IllegalStateException each call to this function must (eventually) be followed by a call to
                              {@link #releaseAllOperations()}. If this function is invoked more than once before an
                              accompanying {@link #releaseAllOperations()} is called, it is illegal state.
ambry-api/src/test/java/com/github/ambry/rest/MockRestRequestService.java