private void waitUntilLocatorBecomesCoordinator() {
    await().until(() -> system != null && system.isConnected() &&
        getCreator()
            .getVmKind() == ClusterDistributionManager.LOCATOR_DM_TYPE);
  }
Tests starting two locators and two servers in different JVMs
geode-core/src/distributedTest/java/org/apache/geode/distributed/LocatorDUnitTest.java