@Override
  public void channelRead0(ChannelHandlerContext ctx, HttpObject obj) throws Exception {
    if (obj != null && obj instanceof HttpRequest) {
      if (obj.decoderResult().isSuccess()) {
        handleRequest((HttpRequest) obj);
      } else {
        throw new RestServiceException("Malformed request received - " + obj, RestServiceErrorCode.MalformedRequest);
      }
    } else if (obj != null && obj instanceof HttpContent) {
      handleContent((HttpContent) obj);
    } else {
      throw new RestServiceException("HttpObject received is null or not of a known type",
          RestServiceErrorCode.MalformedRequest);
    }
  }
A test handler that forms the pipeline of the {@link EmbeddedChannel} used in tests.
<p/>
Exposes some URI strings through which a predefined flow can be executed and verified.
ambry-rest/src/test/java/com/github/ambry/rest/NettyResponseChannelTest.java