@Test
  public void testCacheCloseUsingTryWithResources() throws Exception {
    Cache extCache;

    // try block creates and close cache
    try (Cache cache = new CacheFactory(createGemFireProperties()).create()) {
      extCache = cache;
      assertEquals(false, cache.isClosed());
    }

    if (extCache != null) {
      assertEquals(true, extCache.isClosed());
    } else {
      fail("CacheFactory must be created.");
    }
  }
Ensure that the RegionFactory set methods mirrors those found in RegionAttributes
geode-core/src/integrationTest/java/org/apache/geode/cache/RegionFactoryJUnitTest.java