public boolean isWeavingForFetchGroupsEnabled(String persistenceUnitName) {
    Object fetchGroupsWeaving =
        JUnitTestCase.getDatabaseSession(persistenceUnitName)
            .getProperty("eclipselink.weaving.fetchgroups");

    if (fetchGroupsWeaving == null) {
      fetchGroupsWeaving = System.getProperty("eclipselink.weaving.fetchgroups");
    }

    if ("false".equals(fetchGroupsWeaving)) {
      return false;
    }

    return true;
  }
  public boolean isWeavingForChangeTrackingEnabled(String persistenceUnitName) {
    Object changeTrackingWeaving =
        JUnitTestCase.getDatabaseSession(persistenceUnitName)
            .getProperty("eclipselink.weaving.changetracking");

    if (changeTrackingWeaving == null) {
      changeTrackingWeaving = System.getProperty("eclipselink.weaving.changetracking");
    }

    if ("false".equals(changeTrackingWeaving)) {
      return false;
    }

    return true;
  }