private void doHandleRequestSuccessTest(RestMethod restMethod, AsyncRequestResponseHandler requestHandler)
      throws Exception {
    RestRequest restRequest = createRestRequest(restMethod, MockRestRequestService.ECHO_REST_METHOD, null, null);
    MockRestResponseChannel restResponseChannel = new MockRestResponseChannel();
    sendRequestAwaitResponse(requestHandler, restRequest, restResponseChannel);
    if (restResponseChannel.getException() == null) {
      byte[] response = restResponseChannel.getResponseBody();
      assertArrayEquals("Unexpected response", restMethod.toString().getBytes(), response);
    } else {
      throw restResponseChannel.getException();
    }
  }
Sends a {@link RestRequest} to the {@code requestHandler} with the specified {@code restMethod} and checks the
response to see that the {@code restMethod} has been echoed.
@param restMethod the {@link RestMethod} required.
@param requestHandler the {@link AsyncRequestResponseHandler} instance to use.
@throws Exception
ambry-rest/src/test/java/com/github/ambry/rest/AsyncRequestResponseHandlerTest.java