public final <K, V> Region<K, V> createRegion(final String name, final String rootName,
      final RegionFactory<K, V> regionFactory)
      throws CacheException {

    Region<K, V> root = getRootRegion(rootName);
    if (root == null) {
      RegionFactory<K, V> regionFactoryRoot = getRootRegionFactory(regionFactory);
      regionFactoryRoot.setPartitionAttributes(null);
      root = regionFactoryRoot.create(rootName);
    }
    return regionFactory.createSubregion(root, name);
  }
Local destroy all root regions and close the cache.
geode-dunit/src/main/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java