### Question:
MemObjectCache implements IObjectCache { public void remove(String [] key) throws ApplicationException { memCache.remove(makeMemCacheKey(key)); underlyingCache.remove(key); } MemObjectCache(IObjectCache underlyingCache); String getCacheDir(); void put(String [] key, Object value, boolean isVolatile); Object get(String [] key, boolean isVolatile); void remove(String [] key); boolean exists(String[] key); List<String[]> list(String[] key); static final String CORE; }### Answer:
@Test public void testRemove() throws Exception { FileSerializedObjectCache fileCache = new FileSerializedObjectCache(cacheBuilder.getCacheDir()); MemObjectCache memCache = new MemObjectCache(fileCache); DataCache dcache = cacheBuilder.getCache(); NetworkIds networkIds = dcache.getNetworkIds(Data.CORE, org1Id); assertNotNull(networkIds); dcache.removeData(networkIds); try { NetworkIds networkIds2 = dcache.getNetworkIds(Data.CORE, org1Id); fail("removing object should have given error"); } catch (ApplicationException e) { } }