public FileOutputStream openOutputStream(File file, boolean append) {
    try {
      return openOutputStreamOrThrowIOE(file, append);
    } catch (IOException e) {
      throw new IllegalStateException("Can not open file " + file, e);
    }
  }
@Test
  public void openOutputStream_overwrites_existing_file() throws Exception {
    File file = temp.newFile();
    FileUtils.write(file, "foo");

    try (FileOutputStream outputStream = underTest.openOutputStream(file, false)) {
      IOUtils.write("bar", outputStream);
    }
    assertThat(FileUtils.readFileToString(file)).isEqualTo("bar");
  }