### Question:
FileUtils { public static WithFile with(File file) { return new WithFile(file); }  static WithFile with(File file);  }### Answer:
@Test public void testWriteLines() throws IOException { WithFile withFile = FileUtils.with(folder.newFile()); withFile.writeLines(Arrays.asList("foo", "bar")); Optional<Collection<String>> lines = withFile.readLines(); assertThat(lines, isPresentAnd(hasSize(2))); assertThat(lines, isPresentAnd(hasItem("foo"))); assertThat(lines, isPresentAnd(hasItem("bar"))); }