@Test
  public void startRunsExceptionActionAfterStartupTasksError() {
    Runnable startupCompletionAction = mock(Runnable.class);
    @SuppressWarnings("unchecked")
    Consumer<Throwable> startupExceptionAction = mock(Consumer.class);
    InternalResourceManager internalResourceManager = mock(InternalResourceManager.class);
    Cache cache = createCache(internalResourceManager);
    ServerLauncher serverLauncher = new Builder()
        .setControllableProcessFactory(() -> mock(ControllableProcess.class))
        .setDisableDefaultServer(true)
        .setServerLauncherCacheProvider((a, b) -> cache)
        .setStartupExceptionAction(startupExceptionAction)
        .build();

    when(internalResourceManager.allOfStartupTasks())
        .thenReturn(completedExceptionallyFuture());

    serverLauncher.start();

    verify(startupExceptionAction).accept(any());
    verifyNoMoreInteractions(startupCompletionAction);
  }
Unit tests for {@link ServerLauncher}.

@since GemFire 7.0
geode-core/src/test/java/org/apache/geode/distributed/ServerLauncherTest.java