public static FileOutputStream createForWrite(File f, int permissions)
  throws IOException {
    if (skipSecurity) {
      return insecureCreateForWrite(f, permissions);
    } else {
      return NativeIO.getCreateForWriteFileOutputStream(f, permissions);
    }
  }
@Test(timeout = 10000)
  public void testCreateForWrite() throws IOException {
    try {
      SecureIOUtils.createForWrite(testFilePathIs, 0777);
      fail("Was able to create file at " + testFilePathIs);
    } catch (SecureIOUtils.AlreadyExistsException aee) {
      // expected
    }
  }