@Test
  public void testConflictingUDPPort() {
    Properties config = new Properties();
    config.setProperty(MCAST_PORT, String.valueOf(mcastPort));
    config.setProperty(START_LOCATOR, "localhost[" + locatorPort + "]");
    System.clearProperty(GEMFIRE_PREFIX + MEMBERSHIP_PORT_RANGE);
    config.setProperty(MEMBERSHIP_PORT_RANGE,
        lowerBoundOfPortRange + "-" + upperBoundOfPortRange);

    DistributedSystem.connect(config);

    IgnoredException.addIgnoredException("SystemConnectException", VM.getVM(1));
    VM.getVM(1).invoke(() -> {
      String oldMembershipPortRange = System.clearProperty(GEMFIRE_PREFIX + MEMBERSHIP_PORT_RANGE);
      String locators = (String) config.remove(START_LOCATOR);

      config.put(LOCATORS, locators);

      try {
        assertThatThrownBy(() -> DistributedSystem.connect(config))
            .isInstanceOfAny(GemFireConfigException.class, SystemConnectException.class);
      } finally {
        if (oldMembershipPortRange != null) {
          System.setProperty(GEMFIRE_PREFIX + MEMBERSHIP_PORT_RANGE, oldMembershipPortRange);
        }
      }
    });
  }
test that loopback cannot be used as a bind address when a locator w/o a bind address is being
used
geode-core/src/distributedTest/java/org/apache/geode/distributed/DistributedSystemDUnitTest.java