public static Region createSubregion(Region root, String name, RegionAttributes attrs,
      final InternalRegionArguments internalArgs) throws CacheException {
    Region value = null;
    if (internalArgs == null) {
      value = root.createSubregion(name, attrs);
    } else {
      try {
        LocalRegion lr = (LocalRegion) root;
        value = lr.createSubregion(name, attrs, internalArgs);
      } catch (IOException e) {
        fail("unexpected exception", e);
      } catch (ClassNotFoundException e) {
        fail("unexpected exception", e);
      }
    }
    return value;
  }
A helper for creating a subregion, potentially using a package protected method to do so.

@param root the parent region
@param name the name of the subregion to create
@param attrs the attributes used to create the subregion
@param internalArgs if not null, then use the package protected creation mechanism
@return the subregion whose parent is the provided root
@see Region#createSubregion(String, RegionAttributes)
@see LocalRegion#createSubregion(String, RegionAttributes, InternalRegionArguments)
geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/ha/CQListGIIDistributedTest.java