public static Containerizer from(
      CommonCliOptions commonCliOptions, ConsoleLogger logger, CacheDirectories cacheDirectories)
      throws InvalidImageReferenceException, FileNotFoundException {
    Containerizer containerizer = create(commonCliOptions, logger);

    applyHandlers(containerizer, logger);
    applyConfiguration(containerizer, commonCliOptions, cacheDirectories);

    return containerizer;
  }
@Test
  public void testApplyConfiguration_withValues()
      throws InvalidImageReferenceException, CacheDirectoryCreationException,
          FileNotFoundException {
    CommonCliOptions commonCliOptions =
        CommandLine.populateCommand(
            new CommonCliOptions(),
            "-t=test-image-ref",
            "--send-credentials-over-http",
            "--allow-insecure-registries",
            "--additional-tags=tag1,tag2",
            "--serialize");
    ContainerizerTestProxy containerizer =
        new ContainerizerTestProxy(
            Containerizers.from(commonCliOptions, consoleLogger, cacheDirectories));

    assertThat(Boolean.getBoolean(JibSystemProperties.SEND_CREDENTIALS_OVER_HTTP)).isTrue();
    assertThat(Boolean.getBoolean(JibSystemProperties.SERIALIZE)).isTrue();
    assertThat(containerizer.getAllowInsecureRegistries()).isTrue();
    assertThat(containerizer.getBaseImageLayersCacheDirectory()).isEqualTo(baseImageCache);
    assertThat(containerizer.getApplicationsLayersCacheDirectory()).isEqualTo(applicationCache);
    assertThat(containerizer.getAdditionalTags()).isEqualTo(ImmutableSet.of("tag1", "tag2"));
  }