@Test
  public void setWorkingDirectoryToNonExistingDirectory() {
    // given:

    // when: setting WorkingDirectory to non-existing directory
    Throwable thrown = catchThrowable(() -> new Builder()
        .setWorkingDirectory("/path/to/non_existing/directory"));

    // then: throw IllegalArgumentException
    then(thrown)
        .isExactlyInstanceOf(IllegalArgumentException.class)
        .hasMessage(workingDirectoryNotFoundErrorMessage())
        .hasCause(new FileNotFoundException("/path/to/non_existing/directory"));
  }
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