### Question:
ImageBuilder { public TargetPlatformSpec prepare(TargetPlatformSpec inputSpec) { try { List<Path> platformArtifacts = install(Arrays.asList(inputSpec.getDependencies()),TargetPlatformSpec.platformPath(targetBase)); Path specArtifact = Files.createDirectories(TargetPlatformSpec.configuration(targetBase)).resolve(BLOB_FILENAME); writeBlob(inputSpec,specArtifact); return inputSpec; }catch (Exception e) { throw new RuntimeException("Problem!",e); } } ImageBuilder( Path targetBase); TargetPlatformSpec prepare(TargetPlatformSpec inputSpec); void assembleJar(Path output, URI launcher, TargetPlatformSpec inputSpec); TargetPlatformSpec findSpec(List<URI> c);  }### Answer:
@Test void testInstallDependenciesFromSpec() throws IOException { FileSystem fs = Jimfs.newFileSystem(Configuration.unix()); Path inputs = Files.createDirectories(fs.getPath("/").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 base = fs.getPath("/SOMEWHERE/ELSE"); 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); Path root = fs.getPath("/"); assertThat(TargetPlatformSpec.platformPath(base).resolve("foo1.jar")).exists(); assertThat(TargetPlatformSpec.platformPath(base).resolve("foo2.jar")).exists(); assertThat(spec.getDependencies()[0].getLocation()).isEqualTo(URI.create("file: assertThat(spec.getDependencies()[1].getLocation()).isEqualTo(URI.create("file: }