### Question:
ImageToJsonTranslator { public JsonTemplate getContainerConfiguration() { ContainerConfigurationTemplate template = new ContainerConfigurationTemplate(); for (Layer layer : image.getLayers()) { template.addLayerDiffId(layer.getDiffId()); } for (HistoryEntry historyObject : image.getHistory()) { template.addHistoryEntry(historyObject); } template.setCreated(image.getCreated() == null ? null : image.getCreated().toString()); template.setArchitecture(image.getArchitecture()); template.setOs(image.getOs()); template.setContainerEnvironment(environmentMapToList(image.getEnvironment())); template.setContainerEntrypoint(image.getEntrypoint()); template.setContainerCmd(image.getProgramArguments()); template.setContainerExposedPorts(portSetToMap(image.getExposedPorts())); template.setContainerVolumes(volumesSetToMap(image.getVolumes())); template.setContainerLabels(image.getLabels()); template.setContainerWorkingDir(image.getWorkingDirectory()); template.setContainerUser(image.getUser()); DockerHealthCheck healthCheck = image.getHealthCheck(); if (image.getImageFormat() == V22ManifestTemplate.class && healthCheck != null) { template.setContainerHealthCheckTest(healthCheck.getCommand()); healthCheck .getInterval() .ifPresent(interval -> template.setContainerHealthCheckInterval(interval.toNanos())); healthCheck .getTimeout() .ifPresent(timeout -> template.setContainerHealthCheckTimeout(timeout.toNanos())); healthCheck .getStartPeriod() .ifPresent( startPeriod -> template.setContainerHealthCheckStartPeriod(startPeriod.toNanos())); template.setContainerHealthCheckRetries(healthCheck.getRetries().orElse(null)); } return template; } ImageToJsonTranslator(Image image); JsonTemplate getContainerConfiguration(); T getManifestTemplate(
      Class<T> manifestTemplateClass, BlobDescriptor containerConfigurationBlobDescriptor);  }### Answer:
@Test public void testGetContainerConfiguration() throws IOException, URISyntaxException, DigestException { setUp(V22ManifestTemplate.class); Path jsonFile = Paths.get(Resources.getResource("core/json/containerconfig.json").toURI()); String expectedJson = new String(Files.readAllBytes(jsonFile), StandardCharsets.UTF_8); JsonTemplate containerConfiguration = imageToJsonTranslator.getContainerConfiguration(); Assert.assertEquals(expectedJson, JsonTemplateMapper.toUtf8String(containerConfiguration)); }