ocm.getSession().getRootNode().addNode("test");
ocm.getSession().getRootNode().addNode("references");
ocm.getSession().save();
A firstA = new A();
A secondA = new A();
A thirdA = new A();
A fourthA = new A();
firstA.setPath("/references/a1");
secondA.setPath("/references/a2");
thirdA.setPath("/references/a3");
fourthA.setPath("/references/a4");
firstA.setStringData("the first");
secondA.setStringData("the second");
thirdA.setStringData("the third");
ocm.insert(firstA);
ocm.insert(secondA);
ocm.insert(thirdA);
ocm.insert(fourthA);
assertNotNull(firstA.getPath());
assertNotNull(secondA.getPath());
assertNotNull(thirdA.getPath());
assertNotNull(fourthA.getPath());
firstA = (A) ocm.getObject(firstA.getPath());
secondA = (A) ocm.getObject(secondA.getPath());
thirdA = (A) ocm.getObject(thirdA.getPath());
fourthA = (A) ocm.getObject(fourthA.getPath());
assertNotNull(firstA.getUuid());
assertNotNull(secondA.getUuid());
assertNotNull(thirdA.getUuid());
assertNotNull(fourthA.getUuid());
Main main = new Main();
main.setPath("/test/1");
main.getReferenceMap().put("keyFirst", firstA);