private void assertRangeResolutionSuccess(ByteRange byteRange, long totalSize, long startOffset, long endOffset)
      throws Exception {
    ByteRange resolvedByteRange = byteRange.toResolvedByteRange(totalSize);
    assertEquals("Wrong startOffset with raw range: " + byteRange + " and total size: " + totalSize, startOffset,
        resolvedByteRange.getStartOffset());
    assertEquals("Wrong endOffset with raw range: " + byteRange + " and total size: " + totalSize, endOffset,
        resolvedByteRange.getEndOffset());
  }
Test and assert that a {@link ByteRange} passes validation with a specified total blob size. Ensure that
the defined (wrt the total blob size) start and end offsets are set correctly in the resolved {@link ByteRange}.
@param byteRange the {@link ByteRange} to resolve with a total blob size.
@param totalSize the total size of a blob.
@param startOffset the expected start offset for the resolved {@link ByteRange}
@param endOffset the expected end offset for the resolved {@link ByteRange}
@throws Exception
ambry-api/src/test/java/com/github/ambry/router/ByteRangeTest.java