@Test
  public void buildWithoutMemberNameThrowsIllegalStateException() {
    // given: gemfire.properties with no name
    givenGemFirePropertiesFile(withoutMemberName());

    // when: no MemberName is specified
    Throwable thrown = catchThrowable(() -> new Builder()
        .setCommand(Command.START)
        .build());

    // then: throw IllegalStateException
    then(thrown)
        .isExactlyInstanceOf(IllegalStateException.class)
        .hasMessage(memberNameValidationErrorMessage());
  }
Integration tests for using {@link ServerLauncher} as an in-process API within an existing JVM.
geode-core/src/integrationTest/java/org/apache/geode/distributed/ServerLauncherBuilderIntegrationTest.java