@Test
  public void serverPortCanBeOverriddenBySystemProperty() {
    // given: overridden default port
    int overriddenPort = getRandomAvailableTCPPort();
    System.setProperty(TEST_OVERRIDE_DEFAULT_PORT_PROPERTY, String.valueOf(overriddenPort));

    // when: creating new ServerLauncher
    ServerLauncher launcher = new Builder()
        .build();

    // then: server port should be the overridden default port
    assertThat(launcher.getServerPort()).isEqualTo(overriddenPort);
  }
Integration tests for using {@link ServerLauncher} as an in-process API within an existing JVM.
geode-core/src/integrationTest/java/org/apache/geode/distributed/ServerLauncherIntegrationTest.java