private CompletableFuture<Membership<MemberIdentifier>> launchLocator(
      Supplier<ExecutorService> executorServiceSupplier, int locatorPort, MembershipConfig config) {
    return executorServiceRule.supplyAsync(() -> {
      try {
        Path locatorDirectory0 = temporaryFolder.newFolder().toPath();
        MembershipLocator<MemberIdentifier> locator0 =
            MembershipLocatorBuilder.newLocatorBuilder(
                socketCreator,
                dsfidSerializer,
                locatorDirectory0,
                executorServiceSupplier)
                .setConfig(config)
                .setPort(locatorPort)
                .create();
        locator0.start();

        Membership<MemberIdentifier> membership = createMembership(config, locator0);
        membership.start();
        membership.startEventProcessing();
        return membership;
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    });
  }
Tests of using the membership APIs to make multiple Membership systems that communicate
with each other and form a group
geode-membership/src/integrationTest/java/org/apache/geode/distributed/internal/membership/gms/MembershipIntegrationTest.java