### Question:
DockerImageExtractor { public String extractNameFromYaml(Map<String, Object> fileContents) { Map<String, Object> services = (Map<String, Object>) fileContents.get(Services); AtomicReference<String> imageName = new AtomicReference<>(""); if (services.size() > 0) { services.forEach((key, value) -> imageName.set(parseValue(((Map<String, Object>) value).get(Image).toString()))); } return imageName.get(); } DockerImageExtractor(String baseDir); String extractImageName(); String extractNameFromYaml(Map<String, Object> fileContents);  }### Answer:
@Test @Ignore public void testDockerImageExtrator() throws IOException { ClassLoader classLoader = this.getClass().getClassLoader(); String yamlContent = IOUtils.toString(classLoader.getResourceAsStream("docker-compose.yml")); Yaml yaml = new Yaml(); String imageName = new DockerImageExtractor(null).extractNameFromYaml(yaml.load(yamlContent)); System.out.println(imageName); assertEquals("processors-text-mining-flink", imageName); }