private void testHeadBlobWithVariousRanges(BlobInfo blobInfo) throws Exception {
    long blobSize = blobInfo.getBlobProperties().getBlobSize();
    testHeadBlob(blobInfo, null);
    testHeadBlobWithReservedMetadataId(RESERVED_METADATA_INFO);

    testHeadBlob(blobInfo, ByteRanges.fromLastNBytes(0));
    if (blobSize > 0) {
      testHeadBlob(blobInfo, ByteRanges.fromStartOffset(0));
      testHeadBlob(blobInfo, ByteRanges.fromStartOffset(ThreadLocalRandom.current().nextLong(1, blobSize - 1)));
      testHeadBlob(blobInfo, ByteRanges.fromStartOffset(blobSize - 1));

      long random1 = ThreadLocalRandom.current().nextLong(blobSize);
      long random2 = ThreadLocalRandom.current().nextLong(blobSize);
      testHeadBlob(blobInfo, ByteRanges.fromOffsetRange(Math.min(random1, random2), Math.max(random1, random2)));

      testHeadBlob(blobInfo, ByteRanges.fromLastNBytes(blobSize));
    }
    if (blobSize > 1) {
      testHeadBlob(blobInfo, ByteRanges.fromLastNBytes(ThreadLocalRandom.current().nextLong(1, blobSize)));
    }
  }
Tests {@link SecurityService#processResponse(RestRequest, RestResponseChannel, BlobInfo, Callback)} for a Head
request with the passed in {@link BlobInfo} and various range settings, including no set range (entire blob).
@param blobInfo the {@link BlobInfo} to be used for the {@link RestRequest}s
@throws Exception
ambry-frontend/src/test/java/com/github/ambry/frontend/AmbrySecurityServiceTest.java