109110111112113114115116117118119
Object object; // Check the cache integrity. ensureCacheIntegrity(cache); object = cache.retrieve(key1); assertSame(value1, object); // Check the cache integrity. ensureCacheIntegrity(cache);
115116117118119120121122123124125
assertSame(value1, object); // Check the cache integrity. ensureCacheIntegrity(cache); object = cache.retrieve(key1); assertSame(value1, object); // Check the cache integrity. ensureCacheIntegrity(cache);
191192193194195196197198199200201
Object object; // Check the cache integrity. ensureCacheIntegrity(cache); object = cache.retrieve(key1, providerMock); assertSame(value1, object); // Check the cache integrity. ensureCacheIntegrity(cache);
197198199200201202203204205206207
assertSame(value1, object); // Check the cache integrity. ensureCacheIntegrity(cache); object = cache.retrieve(key1, providerMock); assertSame(value1, object); // Check the cache integrity. ensureCacheIntegrity(cache);
260261262263264265266267268269270
266267268269270271272273274275276
assertSame(value1, object); // Check the cache integrity. ensureCacheIntegrity(cache); object = cache.retrieve(key2); assertSame(value2, object); // Check the cache integrity. ensureCacheIntegrity(cache);
275276277278279280281282283284285
ensureCacheIntegrity(cache); // At this point cache contains (key2, key1). // Retrieving this should discard the entry for key1. object = cache.retrieve(key3); assertSame(value3, object); // Check the cache integrity. ensureCacheIntegrity(cache);
283284285286287288289290291292293
// Check the cache integrity. ensureCacheIntegrity(cache); // At this point cache contains (key3, key2). object = cache.retrieve(key2); assertSame(value2, object); // Check the cache integrity. ensureCacheIntegrity(cache);
292293294295296297298299300301302
ensureCacheIntegrity(cache); // At this point cache contains (key2, key3). // Retrieving this should discard the entry for key3. object = cache.retrieve(key1); assertSame(value1, object); // Check the cache integrity. ensureCacheIntegrity(cache);
368369370371372373374375376377378
Object value; // Check the cache integrity. ensureCacheIntegrity(cache); value = cache.retrieve(key1); assertEquals(value1, value); // Check the cache integrity. ensureCacheIntegrity(cache);