private void doRequestHandleWithChunkedResponse(boolean useSSL) throws Exception {
    EmbeddedChannel channel = createChannel(useSSL);
    HttpHeaders headers = new DefaultHttpHeaders();
    headers.add(EchoMethodHandler.IS_CHUNKED, "true");
    HttpRequest request = RestTestUtils.createRequest(HttpMethod.POST, "POST", headers);
    HttpUtil.setKeepAlive(request, true);
    sendRequestCheckResponse(channel, request, "POST", headers, false, true, useSSL);
    Assert.assertTrue("Channel should not be closed ", channel.isOpen());
    channel.close();
  }
Does a test for the request handling flow with transfer encoding chunked
ambry-rest/src/test/java/com/github/ambry/rest/PublicAccessLogHandlerTest.java