@Test public void should_copy_file_from_inputstream_to_temp_file() throws IOException { final InputStream resourceAsStream = new ByteArrayInputStream("Hello Buildah".getBytes()); final FileManager fileManager = new FileManager("hello.txt", resourceAsStream); final Path copyToTemp = fileManager.copyToTemp(); assertThat(copyToTemp) .exists() .hasContent("Hello Buildah"); }
Path copyToTemp() throws IOException { final Path buildahTempDirectory = Files.createTempDirectory("buildah"); return copyToLocation(buildahTempDirectory); }
FileManager { Path copyToTemp() throws IOException { final Path buildahTempDirectory = Files.createTempDirectory("buildah"); return copyToLocation(buildahTempDirectory); } }
FileManager { Path copyToTemp() throws IOException { final Path buildahTempDirectory = Files.createTempDirectory("buildah"); return copyToLocation(buildahTempDirectory); } FileManager(String name, InputStream content); }
FileManager { Path copyToTemp() throws IOException { final Path buildahTempDirectory = Files.createTempDirectory("buildah"); return copyToLocation(buildahTempDirectory); } FileManager(String name, InputStream content);  }
FileManager { Path copyToTemp() throws IOException { final Path buildahTempDirectory = Files.createTempDirectory("buildah"); return copyToLocation(buildahTempDirectory); } FileManager(String name, InputStream content);   }