@Test public void testValidGetStoreKeysInByteRange() { List<Pair<StoreKey, Long>> keysAndContentSizes = createKeysAndContentSizes(60, 1, 1000000, 100); CompositeBlobInfo compositeBlobInfo = new CompositeBlobInfo(keysAndContentSizes); long totalSize = compositeBlobInfo.getTotalSize(); assertGetStoreKeysInByteRange(0, totalSize - 1, compositeBlobInfo, keysAndContentSizes); assertGetStoreKeysInByteRange(totalSize - 1, totalSize - 1, compositeBlobInfo, keysAndContentSizes); assertGetStoreKeysInByteRange(0, 0, compositeBlobInfo, keysAndContentSizes); assertGetStoreKeysInByteRange(0, (totalSize - 1) / 2, compositeBlobInfo, keysAndContentSizes); assertGetStoreKeysInByteRange((totalSize - 1) / 2, (totalSize - 1), compositeBlobInfo, keysAndContentSizes); assertGetStoreKeysInByteRange((totalSize - 1) / 3, 2 * (totalSize - 1) / 3, compositeBlobInfo, keysAndContentSizes); assertGetStoreKeysInByteRange((totalSize - 1) / 2, (totalSize - 1) / 2, compositeBlobInfo, keysAndContentSizes); assertGetStoreKeysInByteRange((totalSize - 1) / 2, (totalSize - 1) / 2 + 1, compositeBlobInfo, keysAndContentSizes); assertGetStoreKeysInByteRange(1, totalSize - 2, compositeBlobInfo, keysAndContentSizes); }
public long getTotalSize() { return totalSize; }
CompositeBlobInfo { public long getTotalSize() { return totalSize; } }
CompositeBlobInfo { public long getTotalSize() { return totalSize; } CompositeBlobInfo(int chunkSize, long totalSize, List<StoreKey> keys);  CompositeBlobInfo(List<Pair<StoreKey, Long>> keysAndContentSizes); }
CompositeBlobInfo { public long getTotalSize() { return totalSize; } CompositeBlobInfo(int chunkSize, long totalSize, List<StoreKey> keys);  CompositeBlobInfo(List<Pair<StoreKey, Long>> keysAndContentSizes); List<ChunkMetadata> getStoreKeysInByteRange(long start, long end); long getTotalSize(); int getChunkSize(); List<StoreKey> getKeys(); List<ChunkMetadata> getChunkMetadataList(); short getMetadataContentVersion(); }
CompositeBlobInfo { public long getTotalSize() { return totalSize; } CompositeBlobInfo(int chunkSize, long totalSize, List<StoreKey> keys);  CompositeBlobInfo(List<Pair<StoreKey, Long>> keysAndContentSizes); List<ChunkMetadata> getStoreKeysInByteRange(long start, long end); long getTotalSize(); int getChunkSize(); List<StoreKey> getKeys(); List<ChunkMetadata> getChunkMetadataList(); short getMetadataContentVersion();  }