private void waitForMemberToBecomeLeadMemberOfDistributedSystem(final DistributedMember member,
      final DistributedSystem sys) {
    await().until(() -> {
      DistributedMember lead = MembershipManagerHelper.getLeadMember(sys);
      if (member != null) {
        return member.equals(lead);
      }
      return lead == null;
    });
  }
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