@After
  public void tearDown() throws Exception {
    InternalDistributedSystem ids = InternalDistributedSystem.getAnyInstance();
    if (ids != null && ids.isConnected()) {
      if (r1 != null) {
        cleanUpRegion(r1);
      }
      if (sr1 != null) {
        cleanUpRegion(sr1);
      }

      ids.disconnect();
    }
    distSys = null;
    cache = null;
  }
Unit test for the ClientRegionFactory class

@since GemFire 6.5
geode-core/src/integrationTest/java/org/apache/geode/cache/client/ClientRegionFactoryJUnitTest.java