private void checkConnectionAndPrintInfo(VM vm1) {
    vm1.invoke(() -> {
      DistributedSystem sys = system;
      if (sys != null && sys.isConnected()) {
        sys.disconnect();
      }
    });
  }
a locator is restarted twice with a server and ends up in a split-brain
geode-core/src/distributedTest/java/org/apache/geode/distributed/LocatorDUnitTest.java