// Check if all blocks are properly cached and retrieved
for (CachedItem block : blocks) {
HeapSize buf = cache.getBlock(block.cacheKey, true, false);
assertTrue(buf != null);
assertEquals(buf.heapSize(), block.heapSize());
}
// Verify correctly calculated cache heap size
assertEquals(expectedCacheSize, cache.heapSize());