private ByteBuffer generateContent(List<HttpContent> httpContents, boolean useCopyForcingByteBuf) {
    byte[] contentBytes = TestUtils.getRandomBytes(GENERATED_CONTENT_SIZE);
    splitContent(contentBytes, GENERATED_CONTENT_PART_COUNT, httpContents, useCopyForcingByteBuf);
    return ByteBuffer.wrap(contentBytes);
  }
Generates random content and fills it up (in parts) in {@code httpContents}.
@param httpContents the {@link List<HttpContent>} that will contain all the content in parts.
@param useCopyForcingByteBuf if {@code true}, uses {@link CopyForcingByteBuf} instead of the default
                             {@link ByteBuf}.
@return the whole content as a {@link ByteBuffer} - serves as a source of truth.
ambry-rest/src/test/java/com/github/ambry/rest/NettyRequestTest.java