@Test
  public void testProvidedExecutorNotDisposed()
      throws InvalidImageReferenceException, InterruptedException, CacheDirectoryCreationException,
          IOException, RegistryException, ExecutionException {
    ExecutorService executorService = Executors.newCachedThreadPool();
    try {
      Jib.fromScratch()
          .containerize(
              Containerizer.to(RegistryImage.named(dockerHost + ":5000/foo"))
                  .setExecutorService(executorService)
                  .setAllowInsecureRegistries(true));
      Assert.assertFalse(executorService.isShutdown());
    } finally {
      executorService.shutdown();
    }
  }
Ensure that a provided executor is not disposed.
jib-core/src/integration-test/java/com/google/cloud/tools/jib/api/JibIntegrationTest.java