private HttpContent createContent(String content, boolean isLast) {
    ByteBuf buf = PooledByteBufAllocator.DEFAULT.heapBuffer(content.getBytes().length);
    buf.writeBytes(content.getBytes());
    if (isLast) {
      return new DefaultLastHttpContent(buf);
    } else {
      return new DefaultHttpContent(buf);
    }
  }
Creates {@link HttpContent} wrapping the {@code content}.
@param content the content to wrap.
@param isLast {@code true} if this is the last piece of content. {@code false} otherwise.
@return a {@link HttpContent} wrapping the {@code content}.
ambry-rest/src/test/java/com/github/ambry/rest/NettyResponseChannelTest.java