* <field name="a" depth="X"/>
*/
public void testRefreshDoubleDepthUnlimited() {
logger.log(BasicLevel.DEBUG, "************testRefreshDoubleDepthUnlimited**************");
Country country = new Country("p","Portugal");
Address address = new Address("Rue Christiano", "Lisbonne", country);
Person grandParent = new Person();
grandParent.setName("Simoes Joel");
grandParent.setAge(90);
grandParent.setAddress(address);
Person parent1 = new Person("Simoes Sofia", address, null, 70);
Person parent2 = new Person("Simoes Michael", address, null, 70);
Set parent = new HashSet();
parent.add(parent1);
parent.add(parent2);
grandParent.setChildren(parent);
Person child1 = new Person("Simoes Maria", address, null, 40);
Person child2 = new Person("Simoes Juan", address, null, 40);
Set children1 = new HashSet();
children1.add(child1);
Set children2 = new HashSet();
children2.add(child2);
parent1.setChildren(children1);
parent2.setChildren(children2);
Person grandChild1 = new Person("Simoes Leia", address, null, 10);
Person grandChild2 = new Person("Simoes Carlos", address, null, 10);
Set grandChildren1 = new HashSet();
grandChildren1.add(grandChild1);
Set grandChildren2 = new HashSet();
grandChildren2.add(grandChild2);
child1.setChildren(grandChildren1);
child2.setChildren(grandChildren2);
PersistenceManager pm = pmf.getPersistenceManager();
FetchPlan fp = pm.getFetchPlan();
fp.clearGroups();
fp.addGroup("detailChildren3").removeGroup("default");
pm.currentTransaction().begin();
logger.log(BasicLevel.DEBUG, "make persistent the person " + grandParent.toString());
pm.makePersistent(grandParent);
pm.currentTransaction().commit();
logger.log(BasicLevel.DEBUG, "FG: " + fp.getGroups());
try {
pm.currentTransaction().begin();
Address a = new Address("Rue From", "Moon", new Country("sl", "Solarus"));
Person pParent = (Person) grandParent.getChildren().iterator().next();
pParent.setAge(2000);
pParent.setAddress(a);
Person pChild = (Person) pParent.getChildren().iterator().next();
pChild.setAge(3000);