{
// *** Slightly adapted Cut&Paste from testAdd() BEGIN
int tCacheMaxSize = 100000; // bytes
int tCacheMaxLifetime = -1; // never expire
emptyCacheDir();
Cache tMemoryCache = new Cache(tCacheMaxSize, tCacheMaxLifetime);
// write html to cache
String tCacheKey = "cachedfile.html";
String tHTML = "<html>very short HTML</html>";
Cacheable tCacheItem = new CachedHTMLItem(tHTML, tCacheKey);
tMemoryCache.add(tCacheKey, tCacheItem);
// get html from cache
tCacheItem = tMemoryCache.get(tCacheKey);
String tCachedContent = ((CachedHTMLItem) tCacheItem).getHTML().trim();
assertTrue("Could not retrieve cashed item: " + tCacheKey, tCacheItem != null);
assertTrue("Cached item doen't contain expected content: " + tCachedContent, tCachedContent.equals(tHTML));
// *** Slightly adapted Cut&Paste from testAdd() END
}