}
@Test
public void testOpenWithCreate() throws Exception {
LOG.info("Test creating a file with O_CREAT");
FileDescriptor fd = NativeIO.open(
new File(TEST_DIR, "testWorkingOpen").getAbsolutePath(),
NativeIO.O_WRONLY | NativeIO.O_CREAT, 0700);
assertNotNull(true);
assertTrue(fd.valid());
FileOutputStream fos = new FileOutputStream(fd);
fos.write("foo".getBytes());
fos.close();
assertFalse(fd.valid());
LOG.info("Test exclusive create");
try {
fd = NativeIO.open(
new File(TEST_DIR, "testWorkingOpen").getAbsolutePath(),