tx.begin();
GlobalTransaction gtx = cache.getCurrentTransaction();
cache.put("/a/b/c", null);
cache.put("/a/b/c", null);
DataNode n=cache.get("/a");
IdentityLock lock=n.getLock();
int num=lock.getReaderOwners().size();
assertEquals(0, num);
// make sure this is write locked.
assertLocked(gtx, "/a", true);
n=cache.get("/a/b");
lock=n.getLock();
num=lock.getReaderOwners().size();
assertEquals(0, num);
// make sure this is write locked.
assertLocked(gtx, "/a/b", true);
n=cache.get("/a/b/c");
lock=n.getLock();
num=lock.getReaderOwners().size();
assertEquals(0, num);
// make sure this is write locked.
assertLocked(gtx, "/a/b/c", true);