### Question:
CloudDeployer { public String createImage(Path targetBase) throws InvalidImageReferenceException, IOException, InterruptedException, RegistryException, CacheDirectoryCreationException, ExecutionException { JibContainerBuilder containerBuilder = Jib.from(BASE_IMAGE); Path specPath = TargetPlatformSpec.configuration(sourceBase).resolve(BLOB_FILENAME); TargetPlatformSpec spec = mapper.readValue(Files.readAllBytes(specPath), TargetPlatformSpec.class); LOG.info("Copy " + launcherPath + " to " + sourceBase); containerBuilder.addLayer(Collections.singletonList(launcherPath), AbsoluteUnixPath.fromPath(targetBase)); containerBuilder.addLayer(mapToPaths(spec.getDependencies()), AbsoluteUnixPath.fromPath(TargetPlatformSpec.platformPath(targetBase))); containerBuilder.addLayer(Collections.singletonList(specPath), AbsoluteUnixPath.fromPath(TargetPlatformSpec.configuration(targetBase))); containerBuilder.setCreationTime(Instant.now()); containerBuilder.setEntrypoint(JAVA_PATH, "-jar", "/" + launcherPath.getFileName().toString(), "run"); return deployImage(containerBuilder); } CloudDeployer(Path launcher, Path sourceBase, GolemitesApplicationExtension config); String createImage(Path targetBase); void deployApplication(String imageId);  }### Answer:
@Disabled @Test void tetsBuildImage() throws IOException, InterruptedException, ExecutionException, RegistryException, CacheDirectoryCreationException, InvalidImageReferenceException { Path root = Files.createTempDirectory(new File("./build/").toPath(),"workdir").toAbsolutePath(); Path inputs = Files.createDirectories(root.resolve("INPUTS")); Path p1 = Files.write(inputs.resolve("DATA1"),"data1".getBytes(StandardCharsets.UTF_8)); Path p2 = Files.write(inputs.resolve("DATA2"),"data2".getBytes(StandardCharsets.UTF_8)); Path launcher = Files.write(inputs.resolve("LAUNCHER"),"fakeLauncher".getBytes(StandardCharsets.UTF_8)); Path base = root.resolve("SOMEWHERE/ELSE"); Files.createDirectories(base); ImageBuilder imageBuilder = new ImageBuilder(base); TargetPlatformSpec spec = new TargetPlatformSpec(); spec.setDependencies(new Dependency[] { dependency("foo1", p1.toUri()), dependency("foo2", p2.toUri()) }); TargetPlatformSpec result = imageBuilder.prepare(spec); GolemitesApplicationExtension config = new GolemitesApplicationExtension(); config.setPushTo(PushTarget.FILE); config.setName(root.getFileName().toString()); config.setRepository("test"); CloudDeployer deployer = new CloudDeployer(launcher,base,config); String hash = deployer.createImage(root); assertThat(hash).isNotBlank(); assertThat(base.resolve(config.getName() + "-image.tar.gz")).exists(); }