@Test
  public void twoMembershipsCanStartWithOneLocator()
      throws IOException, MemberStartupException {

    final MembershipLocator<MemberIdentifier> locator = createLocator(0);
    locator.start();

    final int locatorPort = locator.getPort();

    final Membership<MemberIdentifier> membership1 = createMembership(locator, locatorPort);
    start(membership1);

    final Membership<MemberIdentifier> membership2 = createMembership(null, locatorPort);
    start(membership2);

    await().untilAsserted(
        () -> assertThat(membership1.getView().getMembers()).hasSize(2));

    await().untilAsserted(
        () -> assertThat(membership2.getView().getMembers()).hasSize(2));

    stop(membership1, membership2);
    stop(locator);
  }
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