private void doRequestHandlerExceptionTest(HttpMethod httpMethod, HttpResponseStatus expectedStatus) {
    EmbeddedChannel channel = createChannel();
    channel.writeInbound(RestTestUtils.createRequest(httpMethod, "/", null));
    channel.writeInbound(new DefaultLastHttpContent());
    // first outbound has to be response.
    HttpResponse response = (HttpResponse) channel.readOutbound();
    assertEquals("Unexpected response status", expectedStatus, response.status());
  }
Does a test where the request handler inside {@link NettyMessageProcessor} fails. Checks for the right error code
in the response.
@param httpMethod the {@link HttpMethod} to use for the request.
@param expectedStatus the excepted {@link HttpResponseStatus} in the response.
ambry-rest/src/test/java/com/github/ambry/rest/NettyMessageProcessorTest.java