n2.addEdge(n4.getName(), new EdgeWeight(7));
n2.addEdge(n5.getName(), new EdgeWeight(4));
PersistenceManager pm = pmf.getPersistenceManager();
FetchPlan fp = pm.getFetchPlan();
fp.clearGroups();
fp.addGroup("keyValue").removeGroup("default");
pm.currentTransaction().begin();
logger.log(BasicLevel.DEBUG, "make persistent the nodes " + n1.toString() + ", " + n2.toString()
+ ", " + n3.toString() + ", " + n4.toString() + ", " + n5.toString());
pm.makePersistent(n1);
pm.makePersistent(n2);
pm.makePersistent(n3);
pm.makePersistent(n4);
pm.makePersistent(n5);
pm.currentTransaction().commit();
logger.log(BasicLevel.DEBUG, "FG: " + fp.getGroups());
try {
Node detachedN1 = (Node) pm.detachCopy(n1);
assertEquals(n1.getName(), detachedN1.getName());
assertEquals(n1.getEdges().size(), detachedN1.getEdges().size());