assertNotNull(firstA.getUuid());
assertNotNull(secondA.getUuid());
assertNotNull(thirdA.getUuid());
Main main = new Main();
main.setPath("/test/1");
main.getReferenceMap().put("keyFirst", firstA);
main.getReferenceMap().put("keySecond", secondA);
main.getReferenceMap().put("keyThird", thirdA);
Main main2 = new Main();
main2.setPath("/test/2");
main2.getReferenceMap().put("AnotherkeyFirst", firstA);
main2.getReferenceMap().put("AnotherkeySecond", secondA);
main2.getReferenceMap().put("AnotherkeyThird", thirdA);
ocm.insert(main);
ocm.insert(main2);
main = (Main) ocm.getObject(main.getPath());
main2 = (Main) ocm.getObject(main2.getPath());
assertEquals("Referenced objects in store were not retrieved.", 3, main.getReferenceMap().size());
assertNotNull("Reference could not be retrieved by its original key", main.getReferenceMap().get("keyFirst"));
assertNotNull("Reference could not be retrieved by its original key", main.getReferenceMap().get("keySecond"));
assertNotNull("Reference could not be retrieved by its original key", main.getReferenceMap().get("keyThird"));
assertEquals("Referenced objects in store were not retrieved.", 3, main2.getReferenceMap().size());
assertNotNull("Reference could not be retrieved by its original key", main2.getReferenceMap().get("AnotherkeyFirst"));
assertNotNull("Reference could not be retrieved by its original key", main2.getReferenceMap().get("AnotherkeySecond"));
assertNotNull("Reference could not be retrieved by its original key", main2.getReferenceMap().get("AnotherkeyThird"));
assertEquals("the first", main.getReferenceMap().get("keyFirst").getStringData());
assertEquals("the second", main.getReferenceMap().get("keySecond").getStringData());
assertEquals("the third", main.getReferenceMap().get("keyThird").getStringData());
assertEquals("the first", main2.getReferenceMap().get("AnotherkeyFirst").getStringData());
assertEquals("the second", main2.getReferenceMap().get("AnotherkeySecond").getStringData());
assertEquals("the third", main2.getReferenceMap().get("AnotherkeyThird").getStringData());
}