assertEquals(pojo, workspace.getNode(Fqn.fromString("/one/two")).get("key1"));
assertEquals(1, workspace.getNode(Fqn.fromString("/one/two")).getMergedData().size());
assertEquals(3, entry.getLocks().size());
for (Iterator it = entry.getLocks().iterator(); it.hasNext();)
{
IdentityLock lock = (IdentityLock) it.next();
assertTrue(lock.isWriteLocked());
assertEquals(gtx, lock.getWriterOwner());
}
assertEquals(1, entry.getModifications().size());
assertTrue(!cache.exists("/one/two"));
//assertEquals(null,dummy.getCalled());
assertEquals(MethodDeclarations.optimisticPrepareMethod, dummy.getCalled());
MethodCall commitMethod = MethodCallFactory.create(MethodDeclarations.commitMethod, new Object[]{gtx});
try
{
cache._replicate(commitMethod);
}
catch (Throwable t)
{
fail();
}
assertEquals(3, entry.getLocks().size());
for (Iterator it = entry.getLocks().iterator(); it.hasNext();)
{
IdentityLock lock = (IdentityLock) it.next();
assertEquals(false, lock.isLocked());
}
//make sure the nodes and locks are the same order
int i = 0;
for (Iterator it = workspace.getNodes().values().iterator(); it.hasNext();)