private void onResponseCompleteWithNonRestException() {
    restResponseChannel.onResponseComplete(
        new RuntimeException(TestingUri.OnResponseCompleteWithNonRestException.toString()));
    assertEquals("ResponseStatus does not reflect error", ResponseStatus.InternalServerError,
        restResponseChannel.getStatus());
    assertFalse("Request channel is not closed", request.isOpen());
  }
Forces the response to complete with a non Rest Exception for testing purpose.
ambry-rest/src/test/java/com/github/ambry/rest/NettyResponseChannelTest.java