### Question:
Containerizer { public static Containerizer to(RegistryImage registryImage) { ImageConfiguration imageConfiguration = ImageConfiguration.builder(registryImage.getImageReference()) .setCredentialRetrievers(registryImage.getCredentialRetrievers()) .build(); Function<BuildContext, StepsRunner> stepsRunnerFactory = buildContext -> StepsRunner.begin(buildContext).registryPushSteps(); return new Containerizer( DESCRIPTION_FOR_DOCKER_REGISTRY, imageConfiguration, stepsRunnerFactory, true); } private  Containerizer(
      String description,
      ImageConfiguration imageConfiguration,
      Function<BuildContext, StepsRunner> stepsRunnerFactory,
      boolean mustBeOnline); static Containerizer to(RegistryImage registryImage); static Containerizer to(DockerDaemonImage dockerDaemonImage); static Containerizer to(TarImage tarImage); Containerizer withAdditionalTag(String tag); Containerizer setExecutorService(@Nullable ExecutorService executorService); Containerizer setBaseImageLayersCache(Path cacheDirectory); Containerizer setApplicationLayersCache(Path cacheDirectory); Containerizer addEventHandler(
      Class<E> eventType, Consumer<? super E> eventConsumer); Containerizer addEventHandler(Consumer<JibEvent> eventConsumer); Containerizer setAllowInsecureRegistries(boolean allowInsecureRegistries); Containerizer setOfflineMode(boolean offline); Containerizer setToolName(String toolName); Containerizer setToolVersion(@Nullable String toolVersion); Containerizer setAlwaysCacheBaseImage(boolean alwaysCacheBaseImage); static final Path DEFAULT_BASE_CACHE_DIRECTORY; }### Answer:
@Test public void testTo() throws CacheDirectoryCreationException { RegistryImage registryImage = RegistryImage.named(ImageReference.of(null, "repository", null)); DockerDaemonImage dockerDaemonImage = DockerDaemonImage.named(ImageReference.of(null, "repository", null)); TarImage tarImage = TarImage.at(Paths.get("ignored")).named(ImageReference.of(null, "repository", null)); verifyTo(Containerizer.to(registryImage)); verifyTo(Containerizer.to(dockerDaemonImage)); verifyTo(Containerizer.to(tarImage)); }