@Test
  public void setPortToZeroOrGreaterUsesValue() throws Exception {
    Builder builder = new Builder();

    builder.setPort(0);
    assertThat(builder.getPort().intValue()).isEqualTo(0);

    builder.setPort(1);
    assertThat(builder.getPort().intValue()).isEqualTo(1);

    builder.setPort(80);
    assertThat(builder.getPort().intValue()).isEqualTo(80);

    builder.setPort(1024);
    assertThat(builder.getPort().intValue()).isEqualTo(1024);

    builder.setPort(65535);
    assertThat(builder.getPort().intValue()).isEqualTo(65535);
  }
Unit tests for {@link LocatorLauncher.Builder}. Extracted from {@link LocatorLauncherTest}.
geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherBuilderTest.java