### Question:
MemObjectCache implements IObjectCache { public String getCacheDir() throws ApplicationException { return underlyingCache.getCacheDir(); } 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 testVolatileObjects() 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); int numNetworks = networkIds.getNetworkIds().length; NetworkIds userNetworkIds = networkIds.copy("user1"); dcache.putNetworkIds(userNetworkIds); DataCache dcache2 = new DataCache(new FileSerializedObjectCache(cacheBuilder.getCacheDir())); long SILLY_NETWORK_TEST_VALUE = 55; userNetworkIds.setNetworkIds(new long[] {SILLY_NETWORK_TEST_VALUE}); dcache2.putNetworkIds(userNetworkIds); NetworkIds userNetworkIds2 = dcache.getNetworkIds("user1", org1Id); assertNotNull(userNetworkIds2); assertEquals(1, userNetworkIds2.getNetworkIds().length); assertEquals(SILLY_NETWORK_TEST_VALUE, userNetworkIds2.getNetworkIds()[0]); }