/** @throws Exception If failed. */ public void testNames() throws Exception { assertEquals("value1", svc.cacheable(1)); Collection<String> names = mgr.getCacheNames(); assertEquals(names.toString(), 2, names.size()); }
/** @throws Exception If failed. */ public void testPutAndEvict() throws Exception { GridCache<Object, String> c = grid().cache(DATA_CACHE_NAME); assertEquals("value1", svc.cachePut(1)); assertEquals(2, c.size()); assertEquals("value1", c.get(key("testCache1", 1))); assertEquals("value1", c.get(key("testCache2", 1))); svc.cacheEvict(1); assertEquals(1, c.size()); assertEquals(null, c.get(key("testCache1", 1))); assertEquals("value1", c.get(key("testCache2", 1))); }