@Test
  public void testAfterConnect() throws Exception {
    // Assert basic region creation when a Distributed system exists
    distSys = DistributedSystem.connect(createGemFireProperties()); // for teardown

    RegionFactory factory = new RegionFactory();
    r1 = factory.create(r1Name);
    cache = r1.getCache(); // for teardown
    assertBasicRegionFunctionality(r1, r1Name);
  }
Test RegionFactory with Cache close and DistributedSystem disconnect
geode-core/src/integrationTest/java/org/apache/geode/cache/RegionFactoryJUnitTest.java