You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by ht...@apache.org on 2015/01/28 05:46:56 UTC

svn commit: r1655220 - in /openjpa/branches/2.2.1.x: ./ openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fetchgroups/TestFetchGroups.java

Author: hthomann
Date: Wed Jan 28 04:46:56 2015
New Revision: 1655220

URL: http://svn.apache.org/r1655220
Log:
OPENJPA-2536: FetchGroup is not returning lazy fields.  Applied Rick Curtis' fix to 2.2.1.x.

Modified:
    openjpa/branches/2.2.1.x/   (props changed)
    openjpa/branches/2.2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
    openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fetchgroups/TestFetchGroups.java

Propchange: openjpa/branches/2.2.1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 28 04:46:56 2015
@@ -1,5 +1,5 @@
 /openjpa/branches/1.0.x:736493
 /openjpa/branches/2.0.x:1419659,1484136,1484287,1504611
-/openjpa/branches/2.1.x:1415379,1415398,1436150,1469090,1469949,1484300,1484313,1485010,1505837,1513249,1517838,1529241,1530146,1533218,1533280,1539188,1569528,1575444,1591536,1614935,1636464,1648430
+/openjpa/branches/2.1.x:1415379,1415398,1436150,1469090,1469949,1484300,1484313,1485010,1505837,1513249,1517838,1529241,1530146,1533218,1533280,1539188,1569528,1575444,1591536,1614935,1636464,1648430,1655218
 /openjpa/branches/2.2.x:1580898,1580939,1591681
 /openjpa/trunk:1416742,1420324,1430117,1431649,1436957,1436960,1448662,1448796,1451369,1456574,1456614,1459091,1461833,1469646,1469649,1469652,1504282,1600757,1603251

Modified: openjpa/branches/2.2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java?rev=1655220&r1=1655219&r2=1655220&view=diff
==============================================================================
--- openjpa/branches/2.2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java (original)
+++ openjpa/branches/2.2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java Wed Jan 28 04:46:56 2015
@@ -39,6 +39,7 @@ import java.util.TimeZone;
 import java.util.concurrent.locks.ReentrantLock;
 
 import org.apache.commons.lang.StringUtils;
+import org.apache.openjpa.conf.DetachOptions.FetchGroups;
 import org.apache.openjpa.conf.OpenJPAConfiguration;
 import org.apache.openjpa.enhance.DynamicPersistenceCapable;
 import org.apache.openjpa.enhance.FieldManager;
@@ -3217,7 +3218,7 @@ public class StateManagerImpl
                 fetch.addFetchGroup(lfg);
                 lfgAdded = true;
             }
-        } else if (fmd.isInDefaultFetchGroup() && fields == null) {
+        } else if (fetch.hasFetchGroup(FetchGroup.NAME_DEFAULT) && fmd.isInDefaultFetchGroup() && fields == null) {
             // no load group but dfg: add dfg fields if we haven't already
             fields = getUnloadedInternal(fetch, LOAD_FGS, null);
         } else if (!_loaded.get(fmd.getIndex())) {

Modified: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fetchgroups/TestFetchGroups.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fetchgroups/TestFetchGroups.java?rev=1655220&r1=1655219&r2=1655220&view=diff
==============================================================================
--- openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fetchgroups/TestFetchGroups.java (original)
+++ openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fetchgroups/TestFetchGroups.java Wed Jan 28 04:46:56 2015
@@ -25,26 +25,44 @@ import org.apache.openjpa.kernel.FetchCo
 import org.apache.openjpa.persistence.FetchPlan;
 import org.apache.openjpa.persistence.OpenJPAEntityManager;
 import org.apache.openjpa.persistence.OpenJPAEntityManagerFactory;
+import org.apache.openjpa.persistence.OpenJPAEntityManagerSPI;
 import org.apache.openjpa.persistence.test.SingleEMTestCase;
 
 public class TestFetchGroups extends SingleEMTestCase {
     private static final int empPerMgr = 5;
     private static final int mgrCount = 3;
     private static final int empCount = mgrCount * empPerMgr;
-    
-    
+
     private HashSet<FGEmployee> employeeSet = new HashSet<FGEmployee>();
     private HashSet<FGManager> managerSet = new HashSet<FGManager>();
-    
+
     private static final String empDescriptionFieldStr =
-            "org.apache.openjpa.persistence.fetchgroups.FGEmployee.description";
-    
+        "org.apache.openjpa.persistence.fetchgroups.FGEmployee.description";
+
     public void setUp() {
-        super.setUp(CLEAR_TABLES, 
-            FGManager.class, FGDepartment.class, FGEmployee.class, FGAddress.class);
+        super.setUp(CLEAR_TABLES, FGManager.class, FGDepartment.class, FGEmployee.class, FGAddress.class);
         createEmployeeData();
     }
-    
+
+    public void testNoDefaultGroupLazyLoad() {
+        FGEmployee emp = employeeSet.iterator().next();
+        OpenJPAEntityManagerSPI em = emf.createEntityManager();
+
+        FGEmployee e = em.find(FGEmployee.class, emp.getId());
+        assertEquals(emp.getFirstName(), e.getFirstName());
+        em.clear();
+
+        em.getFetchPlan().resetFetchGroups().removeFetchGroup("default").addFetchGroups("AddressFetchGroup");
+        FGEmployee e2 = em.find(FGEmployee.class, emp.getId());
+        em.clear();
+        assertNull(e2.getFirstName());
+
+        FGEmployee e3 = em.find(FGEmployee.class, emp.getId());
+        assertEquals(emp.getFirstName(), e3.getFirstName());
+        em.close();
+
+    }
+
     /**
      * Verify the "default" fetch plan that models JPA's expected eager/lazy fetch load behaviors.
      */
@@ -55,99 +73,94 @@ public class TestFetchGroups extends Sin
         assertNotNull(fp.getFetchGroups());
         assertEquals(1, fp.getFetchGroups().size());
         assertTrue(fp.getFetchGroups().contains("default"));
-        
-        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
-                .getBroker()
-                .getFetchConfiguration();
+
+        FetchConfiguration fetchCfg =
+            ((org.apache.openjpa.persistence.EntityManagerImpl) em).getBroker().getFetchConfiguration();
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
-        
+
         FGManager mgr = managerSet.iterator().next();
         assertNotNull(mgr);
-        
+
         FGManager findMgr = em.find(FGManager.class, mgr.getId());
         em.close();
-        
+
         assertEquals(mgr.getId(), findMgr.getId());
         assertEquals(mgr.getFirstName(), findMgr.getFirstName());
         assertEquals(mgr.getLastName(), findMgr.getLastName());
         assertNull(findMgr.getDescription()); // Should be lazy-loaded
     }
-    
+
     /**
-     * Verify that adding a FetchGroup to the fetch plan makes a normally JPA determined lazy loaded
-     * field to behave as an eagerly loaded field.
+     * Verify that adding a FetchGroup to the fetch plan makes a normally JPA determined lazy loaded field to behave as
+     * an eagerly loaded field.
      */
     public void testDefaultFetchPlan002() {
         OpenJPAEntityManager em = emf.createEntityManager();
         FetchPlan fp = em.getFetchPlan();
         assertNotNull(fp);
-        
+
         fp.addFetchGroup("DescFetchGroup");
         assertNotNull(fp.getFetchGroups());
         assertEquals(2, fp.getFetchGroups().size());
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
-        
-        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
-                .getBroker()
-                .getFetchConfiguration();
+
+        FetchConfiguration fetchCfg =
+            ((org.apache.openjpa.persistence.EntityManagerImpl) em).getBroker().getFetchConfiguration();
         assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         FGManager mgr = managerSet.iterator().next();
         assertNotNull(mgr);
-        
+
         FGManager findMgr = em.find(FGManager.class, mgr.getId());
         em.close();
-        
+
         assertEquals(mgr.getId(), findMgr.getId());
         assertEquals(mgr.getFirstName(), findMgr.getFirstName());
         assertEquals(mgr.getLastName(), findMgr.getLastName());
         assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
     }
-    
+
     /**
-     * Verify that adding a field to the fetch plan makes a normally JPA determined lazy loaded
-     * field to behave as an eagerly loaded field.
+     * Verify that adding a field to the fetch plan makes a normally JPA determined lazy loaded field to behave as an
+     * eagerly loaded field.
      */
     public void testDefaultFetchPlan003() {
         OpenJPAEntityManager em = emf.createEntityManager();
         FetchPlan fp = em.getFetchPlan();
         assertNotNull(fp);
-        
+
         fp.addField(empDescriptionFieldStr);
         assertNotNull(fp.getFetchGroups());
         assertEquals(1, fp.getFetchGroups().size());
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFields().contains(empDescriptionFieldStr));
-        
-        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
-                .getBroker()
-                .getFetchConfiguration();
+
+        FetchConfiguration fetchCfg =
+            ((org.apache.openjpa.persistence.EntityManagerImpl) em).getBroker().getFetchConfiguration();
         assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         FGManager mgr = managerSet.iterator().next();
         assertNotNull(mgr);
-        
+
         FGManager findMgr = em.find(FGManager.class, mgr.getId());
         em.close();
-        
+
         assertEquals(mgr.getId(), findMgr.getId());
         assertEquals(mgr.getFirstName(), findMgr.getFirstName());
         assertEquals(mgr.getLastName(), findMgr.getLastName());
         assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
     }
-    
-    
+
     /**
-     * Verify the use of the "openjpa.FetchGroups" property when used to add a fetch group
-     * to the default fetch plan.  Note when overriding that "default" must be included in the list.
+     * Verify the use of the "openjpa.FetchGroups" property when used to add a fetch group to the default fetch plan.
+     * Note when overriding that "default" must be included in the list.
      */
     public void testPctxDefaultFetchPlan001() {
-        OpenJPAEntityManagerFactory emf2 = createNamedEMF(getPersistenceUnitName(), 
-            FGManager.class, FGDepartment.class, FGEmployee.class, FGAddress.class, 
-            "openjpa.FetchGroups", "default,DescFetchGroup");
-        
+        OpenJPAEntityManagerFactory emf2 =
+            createNamedEMF(getPersistenceUnitName(), FGManager.class, FGDepartment.class, FGEmployee.class,
+                FGAddress.class, "openjpa.FetchGroups", "default,DescFetchGroup");
+
         OpenJPAEntityManager em = emf2.createEntityManager();
         FetchPlan fp = em.getFetchPlan();
         assertNotNull(fp);
@@ -155,37 +168,36 @@ public class TestFetchGroups extends Sin
         assertEquals(2, fp.getFetchGroups().size());
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
-        
-        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
-                .getBroker()
-                .getFetchConfiguration();
+
+        FetchConfiguration fetchCfg =
+            ((org.apache.openjpa.persistence.EntityManagerImpl) em).getBroker().getFetchConfiguration();
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         FGManager mgr = managerSet.iterator().next();
         assertNotNull(mgr);
-        
+
         FGManager findMgr = em.find(FGManager.class, mgr.getId());
         em.close();
         emf2.close();
-        
+
         assertEquals(mgr.getId(), findMgr.getId());
         assertEquals(mgr.getFirstName(), findMgr.getFirstName());
         assertEquals(mgr.getLastName(), findMgr.getLastName());
         assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
     }
-    
+
     /**
-     * Verify the use of the "openjpa.FetchGroups" property - when a list not containing "default"
-     * is provided, then the PCtx's default fetch plan should not include it.  This renders
-     * fields normally eagerly loaded as per JPA rules to behave as lazy loaded fields.
+     * Verify the use of the "openjpa.FetchGroups" property - when a list not containing "default" is provided, then the
+     * PCtx's default fetch plan should not include it. This renders fields normally eagerly loaded as per JPA rules to
+     * behave as lazy loaded fields.
      * 
      * Note that fetch groups are case sensitive, "default" != "Default".
      */
     public void testPctxDefaultFetchPlan002() {
-        OpenJPAEntityManagerFactory emf2 = createNamedEMF(getPersistenceUnitName(), 
-            FGManager.class, FGDepartment.class, FGEmployee.class, FGAddress.class, 
-            "openjpa.FetchGroups", "Default,DescFetchGroup");
-        
+        OpenJPAEntityManagerFactory emf2 =
+            createNamedEMF(getPersistenceUnitName(), FGManager.class, FGDepartment.class, FGEmployee.class,
+                FGAddress.class, "openjpa.FetchGroups", "Default,DescFetchGroup");
+
         OpenJPAEntityManager em = emf2.createEntityManager();
         FetchPlan fp = em.getFetchPlan();
         assertNotNull(fp);
@@ -193,37 +205,36 @@ public class TestFetchGroups extends Sin
         assertEquals(2, fp.getFetchGroups().size());
         assertTrue(fp.getFetchGroups().contains("Default")); // Not the same as "default"
         assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
-        
-        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
-                .getBroker()
-                .getFetchConfiguration();
+
+        FetchConfiguration fetchCfg =
+            ((org.apache.openjpa.persistence.EntityManagerImpl) em).getBroker().getFetchConfiguration();
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         FGManager mgr = managerSet.iterator().next();
         assertNotNull(mgr);
-        
+
         FGManager findMgr = em.find(FGManager.class, mgr.getId());
         em.close();
         emf2.close();
-        
+
         assertEquals(mgr.getId(), findMgr.getId()); // Identity is always loaded
         assertNull(findMgr.getFirstName());
         assertNull(findMgr.getLastName());
         assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
     }
-    
+
     /**
-     * Test clearFetchGroups(), which removes all fetch groups from the fetch plan and reactivates
-     * the "default" fetch plan.
+     * Test clearFetchGroups(), which removes all fetch groups from the fetch plan and reactivates the "default" fetch
+     * plan.
      * 
-     * Note that the method does not place "default" back in the list of active fetch groups, OPENJPA-2413
-     * was opened to note this behavior.
+     * Note that the method does not place "default" back in the list of active fetch groups, OPENJPA-2413 was opened to
+     * note this behavior.
      */
     public void testClearFetchGroups001() {
-        OpenJPAEntityManagerFactory emf2 = createNamedEMF(getPersistenceUnitName(), 
-            FGManager.class, FGDepartment.class, FGEmployee.class, FGAddress.class, 
-            "openjpa.FetchGroups", "Default,DescFetchGroup");
-        
+        OpenJPAEntityManagerFactory emf2 =
+            createNamedEMF(getPersistenceUnitName(), FGManager.class, FGDepartment.class, FGEmployee.class,
+                FGAddress.class, "openjpa.FetchGroups", "Default,DescFetchGroup");
+
         OpenJPAEntityManager em = emf2.createEntityManager();
         FetchPlan fp = em.getFetchPlan();
         assertNotNull(fp);
@@ -232,9 +243,8 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("Default")); // Not the same as "default"
         assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
         
-        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
-                .getBroker()
-                .getFetchConfiguration();
+        FetchConfiguration fetchCfg =
+            ((org.apache.openjpa.persistence.EntityManagerImpl) em).getBroker().getFetchConfiguration();
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
         
         fp.clearFetchGroups();
@@ -256,13 +266,12 @@ public class TestFetchGroups extends Sin
     }
 
     /**
-     * The resetFetchGroups() method restores the fetch plan's active fetch plans to 
-     * the PCtx's configured default.
+     * The resetFetchGroups() method restores the fetch plan's active fetch plans to the PCtx's configured default.
      */
     public void testResetFetchGroups001() {
-        OpenJPAEntityManagerFactory emf2 = createNamedEMF(getPersistenceUnitName(), 
-            FGManager.class, FGDepartment.class, FGEmployee.class, FGAddress.class, 
-            "openjpa.FetchGroups", "Default,DescFetchGroup");
+        OpenJPAEntityManagerFactory emf2 =
+            createNamedEMF(getPersistenceUnitName(), FGManager.class, FGDepartment.class, FGEmployee.class,
+                FGAddress.class, "openjpa.FetchGroups", "Default,DescFetchGroup");
         
         OpenJPAEntityManager em = emf2.createEntityManager();
         FetchPlan fp = em.getFetchPlan();
@@ -272,9 +281,8 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("Default")); // Not the same as "default"
         assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
         
-        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
-                .getBroker()
-                .getFetchConfiguration();
+        FetchConfiguration fetchCfg =
+            ((org.apache.openjpa.persistence.EntityManagerImpl) em).getBroker().getFetchConfiguration();
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
         
         
@@ -292,115 +300,112 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("Default")); // Not the same as "default"
         assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
-        // Verify that the PCtx default fetch plan was properly restored.  "default" should not be enabled
+
+        // Verify that the PCtx default fetch plan was properly restored. "default" should not be enabled
         // since it was not listed by openjpa.FetchGroups.
         FGManager mgr = managerSet.iterator().next();
         assertNotNull(mgr);
-        
+
         FGManager findMgr = em.find(FGManager.class, mgr.getId());
         em.close();
         emf2.close();
-        
+
         assertEquals(mgr.getId(), findMgr.getId()); // Identity is always loaded
-//        assertNull(findMgr.getFirstName()); // Commented out, for OPENJPA-2420
-//        assertNull(findMgr.getLastName());
+        // assertNull(findMgr.getFirstName()); // Commented out, for OPENJPA-2420
+        // assertNull(findMgr.getLastName());
         assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
     }
-    
+
     /**
      * Baseline test for Finder Cache
      */
     public void testFinderCache001() {
         OpenJPAEntityManager em = emf.createEntityManager();
-        
+
         FetchPlan fp = em.getFetchPlan();
         assertNotNull(fp);
         assertNotNull(fp.getFetchGroups());
         assertEquals(1, fp.getFetchGroups().size());
         assertTrue(fp.getFetchGroups().contains("default"));
-        
-        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
-                .getBroker()
-                .getFetchConfiguration();
+
+        FetchConfiguration fetchCfg =
+            ((org.apache.openjpa.persistence.EntityManagerImpl) em).getBroker().getFetchConfiguration();
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         FGManager mgr = managerSet.iterator().next();
         assertNotNull(mgr);
-        
+
         {
             // First find, to prime the Finder Cache
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertNull(findMgr.getDescription()); // Should be lazy-loaded
         }
-        
+
         {
             // Second find, should rely on the finder cache to reuse generated SQL.
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertNull(findMgr.getDescription()); // Should be lazy-loaded
-        }   
-        
+        }
+
         em.close();
     }
-    
+
     /**
-     * Only SQL generated by the PCtx's default fetch plan should be used by the finder cache,
-     * as it currently lacks the ability to distinguish fetch plan configuration in its key value.
-     * The PCtx's default fetch plan is the normal plan not modified by the "openjpa.FetchGroups"
-     * property.
+     * Only SQL generated by the PCtx's default fetch plan should be used by the finder cache, as it currently lacks the
+     * ability to distinguish fetch plan configuration in its key value. The PCtx's default fetch plan is the normal
+     * plan not modified by the "openjpa.FetchGroups" property.
      * 
-     * In this variant, a find using the default fetch plan is first executed to prime the finder cache.
-     * Finds operating under a modified fetch plan should not utilize sql stored in the finder cache.
+     * In this variant, a find using the default fetch plan is first executed to prime the finder cache. Finds operating
+     * under a modified fetch plan should not utilize sql stored in the finder cache.
      */
     public void testFinderCache002() {
         OpenJPAEntityManager em = emf.createEntityManager();
-        
+
         FetchPlan fp = em.getFetchPlan();
         assertNotNull(fp);
         assertNotNull(fp.getFetchGroups());
         assertEquals(1, fp.getFetchGroups().size());
         assertTrue(fp.getFetchGroups().contains("default"));
-        
-        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
-                .getBroker()
-                .getFetchConfiguration();
+
+        FetchConfiguration fetchCfg =
+            ((org.apache.openjpa.persistence.EntityManagerImpl) em).getBroker().getFetchConfiguration();
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         FGManager mgr = managerSet.iterator().next();
         assertNotNull(mgr);
-        
+
         {
             // First find, to prime the Finder Cache
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertNull(findMgr.getDescription()); // Should be lazy-loaded
         }
-        
+
         {
             // Second find, should rely on the finder cache to reuse generated SQL.
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertNull(findMgr.getDescription()); // Should be lazy-loaded
         }
-        
+
         // Add a fetch group to the fetch plan and verify expected behavior
         fp.addFetchGroup("DescFetchGroup");
         assertNotNull(fp.getFetchGroups());
@@ -408,18 +413,18 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
         assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             // Second find, should rely on the finder cache to reuse generated SQL.
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
         }
-        
+
         // Remove the fetch group previously added, and verify expected behavior
         fp.removeFetchGroup("DescFetchGroup");
         assertNotNull(fp.getFetchGroups());
@@ -427,17 +432,17 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertFalse(fp.getFetchGroups().contains("DescFetchGroup"));
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertNull(findMgr.getDescription()); // Should be lazy-loaded
-        }   
-        
+        }
+
         // Add a fetch group to the fetch plan and verify expected behavior
         fp.addFetchGroup("DescFetchGroup");
         assertNotNull(fp.getFetchGroups());
@@ -445,18 +450,18 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
         assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             // Second find, should rely on the finder cache to reuse generated SQL.
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
         }
-        
+
         // Reset the fetch plan, and verify expected behavior
         fp.resetFetchGroups();
         assertNotNull(fp.getFetchGroups());
@@ -467,13 +472,13 @@ public class TestFetchGroups extends Sin
         {
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertNull(findMgr.getDescription()); // Should be lazy-loaded
         }
-        
+
         // Add a fetch group to the fetch plan and verify expected behavior
         fp.addFetchGroup("DescFetchGroup");
         assertNotNull(fp.getFetchGroups());
@@ -517,13 +522,12 @@ public class TestFetchGroups extends Sin
     }
     
     /**
-     * Only SQL generated by the PCtx's default fetch plan should be used by the finder cache,
-     * as it currently lacks the ability to distinguish fetch plan configuration in its key value.
-     * The PCtx's default fetch plan is the normal plan not modified by the "openjpa.FetchGroups"
-     * property.
+     * Only SQL generated by the PCtx's default fetch plan should be used by the finder cache, as it currently lacks the
+     * ability to distinguish fetch plan configuration in its key value. The PCtx's default fetch plan is the normal
+     * plan not modified by the "openjpa.FetchGroups" property.
      * 
-     * In this variant, a find using a modified fetch plan is first executed, which should not be added
-     * to the finder cache.  
+     * In this variant, a find using a modified fetch plan is first executed, which should not be added to the finder
+     * cache.
      */
     public void testFinderCache003() {
         OpenJPAEntityManager em = emf.createEntityManager();
@@ -537,9 +541,8 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
         
-        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
-                .getBroker()
-                .getFetchConfiguration();
+        FetchConfiguration fetchCfg =
+            ((org.apache.openjpa.persistence.EntityManagerImpl) em).getBroker().getFetchConfiguration();
         assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
         
         
@@ -563,17 +566,17 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertFalse(fp.getFetchGroups().contains("DescFetchGroup"));
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertNull(findMgr.getDescription()); // Should be lazy-loaded
-        }   
-        
+        }
+
         // Restore the fetch group to the fetch plan and verify expected behavior
         fp.addFetchGroup("DescFetchGroup");
         assertNotNull(fp.getFetchGroups());
@@ -581,18 +584,18 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
         assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             // Second find, should rely on the finder cache to reuse generated SQL.
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
         }
-        
+
         // Remove the "DescFetchGroup" fetch group, and verify expected behavior
         fp.removeFetchGroup("DescFetchGroup");
         assertNotNull(fp.getFetchGroups());
@@ -600,17 +603,17 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertFalse(fp.getFetchGroups().contains("DescFetchGroup"));
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertNull(findMgr.getDescription()); // Should be lazy-loaded
-        } 
-        
+        }
+
         // Restore the fetch group to the fetch plan and verify expected behavior
         fp.addFetchGroup("DescFetchGroup");
         assertNotNull(fp.getFetchGroups());
@@ -618,18 +621,18 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
         assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             // Second find, should rely on the finder cache to reuse generated SQL.
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
         }
-        
+
         // Reset the fetch plan, and verify expected behavior
         fp.resetFetchGroups();
         assertNotNull(fp.getFetchGroups());
@@ -637,17 +640,17 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertFalse(fp.getFetchGroups().contains("DescFetchGroup"));
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertNull(findMgr.getDescription()); // Should be lazy-loaded
         }
-        
+
         // Restore the fetch group to the fetch plan and verify expected behavior
         fp.addFetchGroup("DescFetchGroup");
         assertNotNull(fp.getFetchGroups());
@@ -691,15 +694,14 @@ public class TestFetchGroups extends Sin
     }
     
     /**
-     * Only SQL generated by the PCtx's default fetch plan should be used by the finder cache,
-     * as it currently lacks the ability to distinguish fetch plan configuration in its key value.
-     * The PCtx's default fetch plan is modified by the "openjpa.FetchGroups" property.
-     *  
+     * Only SQL generated by the PCtx's default fetch plan should be used by the finder cache, as it currently lacks the
+     * ability to distinguish fetch plan configuration in its key value. The PCtx's default fetch plan is modified by
+     * the "openjpa.FetchGroups" property.
      */
     public void testFinderCache004() {
-        OpenJPAEntityManagerFactory emf2 = createNamedEMF(getPersistenceUnitName(), 
-            FGManager.class, FGDepartment.class, FGEmployee.class, FGAddress.class, 
-            "openjpa.FetchGroups", "default,DescFetchGroup");
+        OpenJPAEntityManagerFactory emf2 =
+            createNamedEMF(getPersistenceUnitName(), FGManager.class, FGDepartment.class, FGEmployee.class,
+                FGAddress.class, "openjpa.FetchGroups", "default,DescFetchGroup");
         
         OpenJPAEntityManager em = emf2.createEntityManager();
         FetchPlan fp = em.getFetchPlan();
@@ -708,37 +710,36 @@ public class TestFetchGroups extends Sin
         assertEquals(2, fp.getFetchGroups().size());
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
-        
-        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
-                .getBroker()
-                .getFetchConfiguration();
+
+        FetchConfiguration fetchCfg =
+            ((org.apache.openjpa.persistence.EntityManagerImpl) em).getBroker().getFetchConfiguration();
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         FGManager mgr = managerSet.iterator().next();
         assertNotNull(mgr);
-        
+
         {
             // First find, to prime the Finder Cache
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
         }
-        
+
         {
             // Second find, should rely on the finder cache to reuse generated SQL.
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
         }
-        
+
         // Remove a fetch group to the fetch plan and verify expected behavior
         fp.removeFetchGroup("DescFetchGroup");
         assertNotNull(fp.getFetchGroups());
@@ -746,18 +747,18 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertFalse(fp.getFetchGroups().contains("DescFetchGroup"));
         assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             // Second find, should rely on the finder cache to reuse generated SQL.
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertNull(findMgr.getDescription()); // Should be lazy-loaded
         }
-        
+
         // Restore the fetch group previously removed, and verify expected behavior
         fp.addFetchGroup("DescFetchGroup");
         assertNotNull(fp.getFetchGroups());
@@ -765,17 +766,17 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
-        }   
-        
+        }
+
         // Remove a fetch group to the fetch plan and verify expected behavior
         fp.removeFetchGroup("DescFetchGroup");
         assertNotNull(fp.getFetchGroups());
@@ -783,18 +784,18 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertFalse(fp.getFetchGroups().contains("DescFetchGroup"));
         assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             // Second find, should rely on the finder cache to reuse generated SQL.
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertNull(findMgr.getDescription()); // Should be lazy-loaded
         }
-        
+
         // Reset the fetch plan, and verify expected behavior
         fp.resetFetchGroups();
         assertNotNull(fp.getFetchGroups());
@@ -838,18 +839,18 @@ public class TestFetchGroups extends Sin
     }
     
     /**
-     * Only SQL generated by the PCtx's default fetch plan should be used by the finder cache,
-     * as it currently lacks the ability to distinguish fetch plan configuration in its key value.
-     * The PCtx's default fetch plan is modified by the "openjpa.FetchGroups" property.
-     * 
-     * In this variant, a find using a modified fetch plan is first executed, which should not be added
-     * to the finder cache.  
-     */
-    public void testFinderCache005() {
-        OpenJPAEntityManagerFactory emf2 = createNamedEMF(getPersistenceUnitName(), 
-            FGManager.class, FGDepartment.class, FGEmployee.class, FGAddress.class, 
-            "openjpa.FetchGroups", "default,DescFetchGroup");
-        
+      * Only SQL generated by the PCtx's default fetch plan should be used by the finder cache, as it currently lacks
+      * the ability to distinguish fetch plan configuration in its key value. The PCtx's default fetch plan is modified
+      * by the "openjpa.FetchGroups" property.
+      * 
+      * In this variant, a find using a modified fetch plan is first executed, which should not be added to the finder
+      * cache.
+      */
+     public void testFinderCache005() {
+        OpenJPAEntityManagerFactory emf2 =
+            createNamedEMF(getPersistenceUnitName(), FGManager.class, FGDepartment.class, FGEmployee.class,
+                FGAddress.class, "openjpa.FetchGroups", "default,DescFetchGroup");
+
         OpenJPAEntityManager em = emf2.createEntityManager();
         FetchPlan fp = em.getFetchPlan();
         assertNotNull(fp);
@@ -857,31 +858,30 @@ public class TestFetchGroups extends Sin
         assertEquals(2, fp.getFetchGroups().size());
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
-        
-        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
-                .getBroker()
-                .getFetchConfiguration();
+
+        FetchConfiguration fetchCfg =
+            ((org.apache.openjpa.persistence.EntityManagerImpl) em).getBroker().getFetchConfiguration();
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         FGManager mgr = managerSet.iterator().next();
         assertNotNull(mgr);
-        
+
         fp.removeFetchGroup("DescFetchGroup");
         assertEquals(1, fp.getFetchGroups().size());
         assertTrue(fp.getFetchGroups().contains("default"));
         assertFalse(fp.getFetchGroups().contains("DescFetchGroup"));
         assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertNull(findMgr.getDescription()); // Should be lazy-loaded
         }
-        
+
         // Restore the "DescFetchGroup" fetch group, and verify expected behavior
         fp.addFetchGroup("DescFetchGroup");
         assertNotNull(fp.getFetchGroups());
@@ -889,17 +889,17 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
-        }   
-        
+        }
+
         // Remove the "DescFetchGroup" fetch group, and verify expected behavior
         fp.removeFetchGroup("DescFetchGroup");
         assertNotNull(fp.getFetchGroups());
@@ -907,17 +907,17 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertFalse(fp.getFetchGroups().contains("DescFetchGroup"));
         assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertNull(findMgr.getDescription()); // Should be lazy-loaded
-        } 
-        
+        }
+
         // Reset the fetch plan, and verify expected behavior
         fp.resetFetchGroups();
         assertNotNull(fp.getFetchGroups());
@@ -925,17 +925,17 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
         }
-        
+
         // Remove the "DescFetchGroup" fetch group, and verify expected behavior
         fp.removeFetchGroup("DescFetchGroup");
         assertNotNull(fp.getFetchGroups());
@@ -978,15 +978,14 @@ public class TestFetchGroups extends Sin
         emf2.close();
     }
     
-    /**
-     * Only SQL generated by the PCtx's default fetch plan should be used by the finder cache,
-     * as it currently lacks the ability to distinguish fetch plan configuration in its key value.
-     * The PCtx's default fetch plan is the normal plan not modified by the "openjpa.FetchGroups"
-     * property.
-     * 
-     * In this variant, a find using the default fetch plan is first executed to prime the finder cache.
-     * Finds operating under a modified fetch plan should not utilize sql stored in the finder cache.
-     */
+     /**
+      * Only SQL generated by the PCtx's default fetch plan should be used by the finder cache, as it currently lacks
+      * the ability to distinguish fetch plan configuration in its key value. The PCtx's default fetch plan is the \
+      * normal plan not modified by the "openjpa.FetchGroups" property.
+      * 
+      * In this variant, a find using the default fetch plan is first executed to prime the finder cache. Finds 
+      * operating under a modified fetch plan should not utilize sql stored in the finder cache.
+      */
     public void testFinderCache006() {
         OpenJPAEntityManager em = emf.createEntityManager();
         
@@ -996,9 +995,8 @@ public class TestFetchGroups extends Sin
         assertEquals(1, fp.getFetchGroups().size());
         assertTrue(fp.getFetchGroups().contains("default"));
         
-        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
-                .getBroker()
-                .getFetchConfiguration();
+        FetchConfiguration fetchCfg =
+            ((org.apache.openjpa.persistence.EntityManagerImpl) em).getBroker().getFetchConfiguration();
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
         
         FGManager mgr = managerSet.iterator().next();
@@ -1033,18 +1031,18 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFields().contains(empDescriptionFieldStr));
         assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             // Second find, should rely on the finder cache to reuse generated SQL.
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
         }
-        
+
         // Remove the field previously added, and verify expected behavior
         fp.removeField(empDescriptionFieldStr);
         assertNotNull(fp.getFetchGroups());
@@ -1052,17 +1050,17 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertFalse(fp.getFetchGroups().contains("DescFetchGroup"));
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertNull(findMgr.getDescription()); // Should be lazy-loaded
-        }   
-        
+        }
+
         // Add a field to the fetch plan and verify expected behavior
         fp.addField(empDescriptionFieldStr);
         assertNotNull(fp.getFetchGroups());
@@ -1070,18 +1068,18 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFields().contains(empDescriptionFieldStr));
         assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             // Second find, should rely on the finder cache to reuse generated SQL.
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
         }
-        
+
         // Reset the fetch groups, and verify expected behavior (note the reset doesn't remove added fields!)
         fp.resetFetchGroups();
         assertNotNull(fp.getFetchGroups());
@@ -1161,9 +1159,8 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFields().contains(empDescriptionFieldStr));
         
-        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
-                .getBroker()
-                .getFetchConfiguration();
+        FetchConfiguration fetchCfg =
+            ((org.apache.openjpa.persistence.EntityManagerImpl) em).getBroker().getFetchConfiguration();
         assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
         
         
@@ -1187,17 +1184,17 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertFalse(fp.getFetchGroups().contains("DescFetchGroup"));
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertNull(findMgr.getDescription()); // Should be lazy-loaded
-        }   
-        
+        }
+
         // Restore the field to the fetch plan and verify expected behavior
         fp.addField(empDescriptionFieldStr);
         assertNotNull(fp.getFetchGroups());
@@ -1205,18 +1202,18 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFields().contains(empDescriptionFieldStr));
         assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             // Second find, should rely on the finder cache to reuse generated SQL.
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
         }
-        
+
         // Remove the "DescFetchGroup" fetch group, and verify expected behavior
         fp.removeField(empDescriptionFieldStr);
         assertNotNull(fp.getFetchGroups());
@@ -1224,17 +1221,17 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertFalse(fp.getFetchGroups().contains("DescFetchGroup"));
         assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertNull(findMgr.getDescription()); // Should be lazy-loaded
-        } 
-        
+        }
+
         // Restore the field to the fetch plan and verify expected behavior
         fp.addField(empDescriptionFieldStr);
         assertNotNull(fp.getFetchGroups());
@@ -1242,18 +1239,18 @@ public class TestFetchGroups extends Sin
         assertTrue(fp.getFetchGroups().contains("default"));
         assertTrue(fp.getFields().contains(empDescriptionFieldStr));
         assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
-        
+
         {
             // Second find, should rely on the finder cache to reuse generated SQL.
             FGManager findMgr = em.find(FGManager.class, mgr.getId());
             em.clear();
-            
+
             assertEquals(mgr.getId(), findMgr.getId());
             assertEquals(mgr.getFirstName(), findMgr.getFirstName());
             assertEquals(mgr.getLastName(), findMgr.getLastName());
             assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
         }
-        
+
         // Reset the fetch plan, and verify expected behavior (should not affect fields)
         fp.resetFetchGroups();
         assertNotNull(fp.getFetchGroups());
@@ -1343,42 +1340,42 @@ public class TestFetchGroups extends Sin
             mgr.setDescription("Manager-" + id);
             mgr.setAddress(addr);
             mgr.setDept(dept);
-            
+
             em.persist(mgr);
-            
+
             managerSet.add(mgr);
         }
-        
+
         // Create Employees
         for (int i = 1; i < empCount; i++) {
             int id = empIdIndex++;
             int mgrId = (id % empPerMgr) + 1;
-            
+
             FGAddress addr = createAddress(id);
             em.persist(addr);
-            
+
             FGDepartment dept = createDepartment(id);
             em.persist(dept);
-            
+
             FGEmployee emp = new FGEmployee();
-            emp.setId(id);           
+            emp.setId(id);
             emp.setFirstName("First-" + id);
             emp.setLastName("Last-" + id);
             emp.setRating("Rating-" + id);
             emp.setDescription("Employee-" + id);
             emp.setAddress(addr);
             emp.setDept(dept);
-            
+
             em.persist(emp);
-            
+
             employeeSet.add(emp);
         }
-        
+
         em.getTransaction().commit();
-        
+
         em.close();
     }
-    
+
     private FGAddress createAddress(int id) {
         FGAddress addr = new FGAddress();
         addr.setId(id);
@@ -1386,15 +1383,15 @@ public class TestFetchGroups extends Sin
         addr.setCity("City-" + id);
         addr.setState("State-" + id);
         addr.setZip(id);
-        
+
         return addr;
     }
-   
+
     private FGDepartment createDepartment(int id) {
         FGDepartment dept = new FGDepartment();
         dept.setId(id);
         dept.setName("Department-" + id);
-        
+
         return dept;
     }
 }