public void testTwoElem() {
PersistenceManager pm = pmf.getPersistenceManager();
pm.currentTransaction().begin();
AllMap am = new AllMap("testTwoElem");
Map l2l = new HashMap();
l2l.put(new Long(12), new Long(34));
l2l.put(new Long(56), new Long(78));
am.setLong2Long(l2l);
Map l2r = new HashMap();
l2r.put(new Long(12), am);
am.setlong2Ref(l2r);
Properties p = new Properties();
p.put("a","b");
p.put("c","d");
am.setProp(p);
Map s2l = new HashMap();
s2l.put("a", new Long(12));
s2l.put("b", new Long(34));
am.setStr2Long(s2l);
Map s2r = new HashMap();
s2r.put("a", am);
am.setStr2Ref(s2r);
pm.makePersistent(am);
Object oid = pm.getObjectId(am);
Assert.assertNotNull("The identifier is null", oid);
pm.currentTransaction().commit();
pm.close();
pm = null;
am = null;
pm = pmf.getPersistenceManager();
am = (AllMap) pm.getObjectById(oid, true);
Assert.assertNotNull("No persistence found with the id " + oid, am);
Assert.assertNotNull("The Map (Long,Long) ", am.getMap_Long2Long());
assertEquals("The Map (Long,Long)", l2l, am.getMap_Long2Long());
Assert.assertNotNull("The Map (Long,Ref) ", am.getMap_Long2Ref());
assertEquals("The Map (Long,Ref)", l2r, am.getMap_Long2Ref());
Assert.assertNotNull("The Map (String,Long) ", am.getMap_str2Long());
assertEquals("The Map (String,Long)", s2l, am.getMap_str2Long());
Assert.assertNotNull("The Map (String,Ref) ", am.getMap_str2Ref());
assertEquals("The Map (String,Ref)", s2r, am.getMap_str2Ref());
Assert.assertNotNull("The HashMap (Long,Long) ", am.getHmap_Long2Long());
assertEquals("The HashMap (Long,Long)", l2l, am.getHmap_Long2Long());
Assert.assertNotNull("The HashMap (Long,Ref) ", am.getHmap_Long2Ref());
assertEquals("The HashMap (Long,Ref) ", l2r, am.getHmap_Long2Ref());
Assert.assertNotNull("The HashMap (String,Long) ", am.getHmap_str2Long());
assertEquals("The HashMap (String,Long) ", s2l, am.getHmap_str2Long());
Assert.assertNotNull("The HashMap (String,Ref) ", am.getHmap_str2Ref());
assertEquals("The HashMap (String,Ref) ", s2r, am.getHmap_str2Ref());
Assert.assertNotNull("The Hashtable (Long,Long) ", am.getHt_Long2Long());
assertEquals("The Hashtable (Long,Long) ", l2l, am.getHt_Long2Long());
Assert.assertNotNull("The Hashtable (Long,Ref) ", am.getHt_Long2Ref());
assertEquals("The Hashtable (Long,Ref) ", l2r, am.getHt_Long2Ref());
Assert.assertNotNull("The Hashtable (String,Long) ", am.getHt_str2Long());
assertEquals("The Hashtable (String,Long) ", s2l, am.getHt_str2Long());
Assert.assertNotNull("The Hashtable (String,Ref) ", am.getHt_str2Ref());
assertEquals("The Hashtable (String,Ref) ", s2r, am.getHt_str2Ref());
Assert.assertNotNull("The Properties ", am.getProp());
assertEquals("The Properties ", p, am.getProp());
pm.currentTransaction().begin();
pm.deletePersistent(am);
pm.currentTransaction().commit();
pm.close();
}