//set the fetch group to listeIntervenants
FetchPlan fp = pm.getFetchPlan();
fp.clearGroups().addGroup("listeIntervenants");
//detach the intervenant
IntervenantHelper copyOfIntervenant1 = (IntervenantHelper) pm.detachCopy(intervenant1);
assertNotNull(copyOfIntervenant1);
assertEquals("Nomep of intervenant1 and its detached copy are not the same.", intervenant1.getNomep(), copyOfIntervenant1.getNomep());
Collection conv = intervenant1.getConventions();
Collection copyConv = copyOfIntervenant1.getConventions();
assertEquals("Size of conventions not the same for intervenant1 and its detached copy.", conv.size(), copyConv.size());