LruCacheAdapter implements MemoryCache<K, V> { @Override public V get(K key) { return lruCache.get(key); } LruCacheAdapter(LruCache<K, V> lruCache); LruCache<K, V> getLruCache(); @Override V get(K key); @Override void put(K key, V value); @Override void remove(K key); @Override void clear(); @Override int getCurrentSize(); @Override int getMaxSize(); @Override boolean has(K key);  }
@Test public void testGet() { LruCacheAdapter<String, Bitmap> cache = new LruCacheAdapter<String, Bitmap>(new MyCache(DEFAULT_SIZE)); cache.put("asd", Bitmap.createBitmap(200, 200, Bitmap.Config.ARGB_8888)); Assert.assertTrue(cache.has("asd")); Assert.assertNotNull(cache.get("asd")); }