ContainerHandler { private String getImageName(ImageConfiguration imageConfiguration) { if (StringUtils.isBlank(imageConfiguration.getName())) { return null; } Properties props = getPropertiesWithSystemOverrides(this.configurationProperties); String configuredRegistry = EnvUtil.firstRegistryOf( imageConfiguration.getRegistry(), props.getProperty("docker.pull.registry"), props.getProperty("docker.registry")); return new ImageName(imageConfiguration.getName()).getFullName(configuredRegistry); } ContainerHandler(Properties configurationProperties, GroupArtifactVersion groupArtifactVersion, ProbeHandler probeHandler);   }
@Test public void getImageNameTest(){ ContainerHandler handler = createContainerHandler(project); ImageConfiguration imageConfiguration2 = new ImageConfiguration.Builder(). name("test").alias("test-app").buildConfig(buildImageConfiguration1).build(); ImageConfiguration imageConfiguration3 = new ImageConfiguration.Builder(). alias("test-app").buildConfig(buildImageConfiguration1).registry("docker.io").build(); ImageConfiguration imageConfiguration4 = new ImageConfiguration.Builder(). alias("test-app").buildConfig(buildImageConfiguration1).registry("docker.io").build(); images.clear(); images.add(imageConfiguration1); images.add(imageConfiguration2); images.add(imageConfiguration3); images.add(imageConfiguration4); containers = handler.getContainers(config1, images); assertEquals("docker.io/test:latest",containers.get(0).getImage()); assertEquals("test:latest",containers.get(1).getImage()); assertNull(containers.get(2).getImage()); assertNull(containers.get(3).getImage()); }