private JSONObject createRequestHeaders(ByteRange range, GetOption getOption) {
    if (range == null && getOption == null) {
      return null;
    }
    JSONObject requestHeaders = new JSONObject();
    if (range != null) {
      requestHeaders.put(RestUtils.Headers.RANGE, RestTestUtils.getRangeHeaderString(range));
    }
    if (getOption != null) {
      requestHeaders.put(RestUtils.Headers.GET_OPTION, getOption.toString());
    }
    return requestHeaders;
  }
Generate a {@link JSONObject} with a range header from a {@link ByteRange}
@param range the {@link ByteRange} to include in the headers.
@param getOption the options to use while getting the blob.
@return the {@link JSONObject} with range and getOption headers (if non-null). {@code null} if both args are
{@code null}.
ambry-frontend/src/test/java/com/github/ambry/frontend/FrontendRestRequestServiceTest.java