AtomicHashMap newMap = new AtomicHashMap();
newMap.initForWriting();
newMap.put("k1", "v4");
newMap = (AtomicHashMap) d.merge(newMap);
assert newMap.containsKey("k1");
assert newMap.get("k1").equals("v3");
assert newMap.size() == 1;
newMap = (AtomicHashMap) d.merge(null);
assert newMap.containsKey("k1");