public final <K, V> Region<K, V> createRegion(final String name, final String rootName,
      final RegionAttributes<K, V> attributes) throws CacheException {
    Region<K, V> root = getRootRegion(rootName);

    if (root == null) {
      // don't put listeners on root region
      AttributesFactory<K, V> attributesFactory = getRootAttributesFactory(attributes);
      attributesFactory.setPartitionAttributes(null);

      RegionAttributes<K, V> rootAttrs = attributesFactory.create();
      root = createRootRegion(rootName, rootAttrs);
    }
    return root.createSubregion(name, attributes);
  }
Local destroy all root regions and close the cache.
geode-dunit/src/main/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java