@VisibleForTesting
  static void addShutdownHook(JobCoordinator jobCoordinator) {
    Runtime.getRuntime()
        .addShutdownHook(new Thread(jobCoordinator::stop, "Samza Job Coordinator Shutdown Hook Thread"));
  }
This is a separate method so it can be stubbed in tests, since adding a real shutdown hook will cause the hook to
added to the test suite JVM.
samza-core/src/main/java/org/apache/samza/clustermanager/JobCoordinatorLaunchUtil.java