GlobalTransaction gtx = cache.getCurrentTransaction();
cache.put("/a/b/c", null);
cache.put("/a/b/c", null);
NodeSPI n = (NodeSPI) cache.getNode("/a");
NodeLock lock = n.getLock();
int num = lock.getReaderOwners().size();
assertEquals(0, num);
// make sure this is write locked.
assertLocked(gtx, "/a", true);
n = (NodeSPI) cache.getNode("/a/b");
lock = n.getLock();
num = lock.getReaderOwners().size();
assertEquals(0, num);
// make sure this is write locked.
assertLocked(gtx, "/a/b", true);
n = (NodeSPI) cache.getNode("/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);
tx.rollback();