int numBlocks = 9;
long blockSize = calculateBlockSizeDefault(maxSize, numBlocks);
assertTrue("calculateBlockSize appears broken.", blockSize * numBlocks <= maxSize);
LruBlockCache cache = new LruBlockCache(maxSize,blockSize);
EvictionThread evictionThread = cache.getEvictionThread();
assertTrue(evictionThread != null);
CachedItem[] blocks = generateFixedBlocks(numBlocks + 1, blockSize, "block");
// Make sure eviction thread has entered run method
while (!evictionThread.isEnteringRun()) {
Thread.sleep(1);
}
// Add all the blocks
for (CachedItem block : blocks) {