@Test
  public void testValidGetStoreKeysInByteRange() {
    List<Pair<StoreKey, Long>> keysAndContentSizes = createKeysAndContentSizes(60, 1, 1000000, 100);
    CompositeBlobInfo compositeBlobInfo = new CompositeBlobInfo(keysAndContentSizes);
    long totalSize = compositeBlobInfo.getTotalSize();
    //total byte range
    assertGetStoreKeysInByteRange(0, totalSize - 1, compositeBlobInfo, keysAndContentSizes);
    //last byte
    assertGetStoreKeysInByteRange(totalSize - 1, totalSize - 1, compositeBlobInfo, keysAndContentSizes);
    //first byte
    assertGetStoreKeysInByteRange(0, 0, compositeBlobInfo, keysAndContentSizes);
    //first half
    assertGetStoreKeysInByteRange(0, (totalSize - 1) / 2, compositeBlobInfo, keysAndContentSizes);
    //second half
    assertGetStoreKeysInByteRange((totalSize - 1) / 2, (totalSize - 1), compositeBlobInfo, keysAndContentSizes);
    //middle third of bytes
    assertGetStoreKeysInByteRange((totalSize - 1) / 3, 2 * (totalSize - 1) / 3, compositeBlobInfo, keysAndContentSizes);
    //byte in the middle
    assertGetStoreKeysInByteRange((totalSize - 1) / 2, (totalSize - 1) / 2, compositeBlobInfo, keysAndContentSizes);
    //two bytes in the middle
    assertGetStoreKeysInByteRange((totalSize - 1) / 2, (totalSize - 1) / 2 + 1, compositeBlobInfo, keysAndContentSizes);
    //total range minus first and last byte
    assertGetStoreKeysInByteRange(1, totalSize - 2, compositeBlobInfo, keysAndContentSizes);
  }
Tests various valid inputs for {@link CompositeBlobInfo#getStoreKeysInByteRange(long, long)}
ambry-messageformat/src/test/java/com/github/ambry/messageformat/CompositeBlobInfoTest.java