@Before
  public void setUp() {
    executorService = Executors.newSingleThreadExecutor();

    locatorvm = VM.getVM(0);
    vm1 = VM.getVM(1);
    vm2 = VM.getVM(2);
    Invoke.invokeInEveryVM(() -> System.setProperty("p2p.joinTimeout", "120000"));
    final int port = locatorvm.invoke(() -> {
      System.setProperty(BYPASS_DISCOVERY_PROPERTY, "true");
      return Locator.startLocatorAndDS(0, new File(""), new Properties()).getPort();
    });
    vm1.invoke(() -> locatorPort = port);
    vm2.invoke(() -> locatorPort = port);
    locatorPort = port;
  }
This class tests the functionality of the {@link ClusterDistributionManager} class.
geode-core/src/distributedTest/java/org/apache/geode/distributed/internal/ClusterDistributionManagerDUnitTest.java