### Question:
CacheManager extends AbstractCacheManager { public static CacheManager getInstance() { return INSTANCE; } private  CacheManager(); static CacheManager getInstance();  }### Answer:
@Test public void putGetMaintTest() { CacheManager cacheManager = CacheManager.getInstance(); for (int i = 1; i <= 1100; i++) { cacheManager.put("key-" + i , "value-" + i); } cacheManager.maintenance(String.class); for (int i = 1; i <= 100; i++) { Assert.assertNull(cacheManager.get(String.class, "key-" + i)); } for (int i = 101; i <= 1100; i++) { Assert.assertEquals("value-" + i, cacheManager.get(String.class, "key-" + i)); } }
@Test public void removeTest() { CacheManager cacheManager = CacheManager.getInstance(); cacheManager.put("CacheManagerTest.removeTest", "testValue"); Assert.assertEquals("testValue", cacheManager.get(String.class, "CacheManagerTest.removeTest")); cacheManager.remove(String.class, "CacheManagerTest.removeTest"); Assert.assertNull(cacheManager.get(String.class, "CacheManagerTest.removeTest")); }