private void delayedHandleRequestThatThrowsRuntimeException(AsyncRequestResponseHandler requestResponseHandler)
      throws Exception {
    RestRequest restRequest =
        createRestRequest(RestMethod.GET, MockRestRequestService.THROW_RUNTIME_EXCEPTION, null, null);
    MockRestResponseChannel restResponseChannel = new MockRestResponseChannel();
    sendRequestAwaitResponse(requestResponseHandler, restRequest, restResponseChannel);
    if (restResponseChannel.getException() == null) {
      fail("Request handling would have failed and an exception should have been generated");
    } else {
      // it's ok if this conversion fails - the test should fail anyway.
      RuntimeException e = (RuntimeException) restResponseChannel.getException();
      assertEquals("Failure message does not match expectation", MockRestRequestService.THROW_RUNTIME_EXCEPTION,
          e.getMessage());
      assertTrue("AsyncRequestResponseHandler is dead", requestResponseHandler.isRunning());
    }
  }
Sends a {@link RestRequest} that requests a {@link RuntimeException}. The failure will happen once the request is
dequeued.
@param requestResponseHandler The {@link AsyncRequestResponseHandler} instance to use.
@throws Exception
ambry-rest/src/test/java/com/github/ambry/rest/AsyncRequestResponseHandlerTest.java