private void givenPortInUse(final int port, InetAddress bindAddress) {
    try {
      socket = SocketCreatorFactory
          .createNonDefaultInstance(false, false, null, null, System.getProperties())
          .forCluster()
          .createServerSocket(port, 50, bindAddress);
      assertThat(socket.isBound()).isTrue();
      assertThat(socket.isClosed()).isFalse();
      assertThat(isPortAvailable(port, SOCKET)).isFalse();
    } catch (IOException e) {
      throw new UncheckedIOException(e);
    }
  }
Abstract base class for integration tests of both {@link LocatorLauncher} and
{@link ServerLauncher}.

@since GemFire 8.0
geode-core/src/integrationTest/java/org/apache/geode/distributed/LauncherIntegrationTestCase.java