private FullHttpResponse sendRequestAndGetResponse(EmbeddedChannel channel, HttpRequest request) {
    channel.writeInbound(request);
    channel.writeInbound(new DefaultLastHttpContent());
    return channel.readOutbound();
  }
Sends request to the passed in channel and returns the response
@param channel to which the request has to be sent
@param request {@link HttpRequest} which has to be sent to the passed in channel
@return the HttpResponse in response to the request sent to the channel
ambry-rest/src/test/java/com/github/ambry/rest/HealthCheckHandlerTest.java