@Test
    void testRemove() {
        net.sf.ehcache.CacheManager ehCacheManager = cacheManager.getCacheManager();
        assertNull(ehCacheManager);

        Cache<String, String> cache = cacheManager.getCache("test");

        ehCacheManager = cacheManager.getCacheManager();
        assertNotNull(ehCacheManager);

        assertNotNull(cache);
        cache.put("hello", "world");
        cache.put("hello2", "world2");
        String value = cache.get("hello");
        assertNotNull(value);
        assertEquals("world", value);
        assertEquals("world2", cache.get("hello2"));
        assertEquals(2, cache.size());

        assertEquals("world", cache.remove("hello"));
        assertEquals(1, cache.size());
        assertEquals("world2", cache.remove("hello2"));
        assertEquals(0, cache.size());

        assertNull(cache.remove("blah"));
    }
TODO - Class JavaDoc

@since May 11, 2010 12:41:38 PM
support/ehcache/src/test/java/org/apache/shiro/cache/ehcache/EhCacheManagerTest.java