private void sendRequestAwaitResponse(AsyncRequestResponseHandler requestHandler, RestRequest restRequest,
      MockRestResponseChannel restResponseChannel) throws InterruptedException, RestServiceException {
    EventMonitor<MockRestResponseChannel.Event> eventMonitor =
        new EventMonitor<MockRestResponseChannel.Event>(MockRestResponseChannel.Event.OnRequestComplete);
    restResponseChannel.addListener(eventMonitor);
    requestHandler.handleRequest(restRequest, restResponseChannel);
    if (!eventMonitor.awaitEvent(1, TimeUnit.SECONDS)) {
      fail("sendRequestAwaitResponse took too long. There might be a problem or the timeout may need to be increased");
    }
  }
Sends a the {@code restRequest} to the {@code requestHandler} for handling and waits for
{@link RestResponseChannel#onResponseComplete(Exception)} to be called in {@code restResponseChannel}.
If there was an exception input to the function, throws that exception.
@param requestHandler the {@link AsyncRequestResponseHandler} instance to use.
@param restRequest the {@link RestRequest} to send to the {@code requestHandler}.
@param restResponseChannel the {@link RestResponseChannel} for responses.
@throws InterruptedException
@throws RestServiceException
ambry-rest/src/test/java/com/github/ambry/rest/AsyncRequestResponseHandlerTest.java