@Test
  public void testReconnectWithQuorum() throws Exception {
    // quorum check fails, then succeeds
    IgnoredException.addIgnoredException("killing member's ds");
    Host host = Host.getHost(0);
    VM vm0 = host.getVM(0);
    VM vm1 = host.getVM(1);
    VM locatorVm = host.getVM(locatorVMNumber);

    final int locPort = locatorPort;

    final String xmlFileLoc = (new File(".")).getAbsolutePath();

    // disable disconnects in the locator so we have some stability
    locatorVm.invoke("disable force-disconnect", () -> {
      MembershipManagerHelper
          .disableDisconnectOnQuorumLossForTesting(Locator.getLocator().getDistributedSystem());
    });

    SerializableCallableIF<DistributedMember> create = () -> {
      locatorPort = locPort;
      Properties props = getDistributedSystemProperties();
      props.put(CACHE_XML_FILE, xmlFileLoc + fileSeparator + "MyDisconnect-cache.xml");
      props.put(MAX_NUM_RECONNECT_TRIES, "2");
      // props.put("log-file", "autoReconnectVM"+VM.getCurrentVMNum()+"_"+getPID()+".log");
      cache = (InternalCache) new CacheFactory(props).create();
      IgnoredException.addIgnoredException("org.apache.geode.ForcedDisconnectException");
      IgnoredException.addIgnoredException("Possible loss of quorum");
      Region myRegion = cache.getRegion("root" + SEPARATOR + "myRegion");
      ReconnectDUnitTest.savedSystem = cache.getDistributedSystem();
      myRegion.put("MyKey1", "MyValue1");
      return savedSystem.getDistributedMember();
    };

    System.out.println("creating caches in vm0 and vm1");
    vm0.invoke("Create Cache and Regions from cache.xml", create);
    vm1.invoke("Create Cache and Regions from cache.xml", create);

    // view is [locator(3), vm0(15), vm1(10), vm2(10)]

    /*
     * now we want to kick out the locator and observe that it reconnects using its rebooted
     * location service
     */
    System.out.println("disconnecting locator");
    forceDisconnect(locatorVm);
    waitForReconnect(locatorVm);

    // if the locator reconnected it did so with its own location
    // service since it doesn't know about any other locators
    ensureLocationServiceRunning(locatorVm);

  }
Creates some region attributes for the regions being created.
geode-core/src/distributedTest/java/org/apache/geode/cache30/ReconnectDUnitTest.java