assertEquals(map.remove(obj1.getKey()), obj1.getValue());
assertEquals(map.remove(obj2.getKey()), obj2.getValue());
assertEquals(map.remove(obj3.getKey()), obj3.getValue());
assertTrue(map.isEmpty());
final ConcurrentHashSet set = new ConcurrentHashSet();
AdvancedCacheLoader.CacheLoaderTask taskWithoutValues = new AdvancedCacheLoader.CacheLoaderTask() {
@Override
public void processEntry(MarshalledEntry marshalledEntry, AdvancedCacheLoader.TaskContext taskContext) throws InterruptedException {
if (marshalledEntry.getKey() != null) {
set.add(marshalledEntry.getKey());
}
}
};
cs.process(null, taskWithoutValues, new ThreadPoolExecutor(1, 2, 1, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(10)), false, false);
assertEquals(set.size(), 3);
assertTrue(set.remove(obj1.getKey()));
assertTrue(set.remove(obj2.getKey()));
assertTrue(set.remove(obj3.getKey()));
assertTrue(map.isEmpty());
}