public void testLockFileExists() throws IOException {
  Path tempDir=createTempDir();
  Path lockFile=tempDir.resolve("test.lock");
  Files.createFile(lockFile);
  Directory dir=getDirectory(tempDir);
  Lock l=dir.obtainLock("test.lock");
  l.close();
  dir.close();
}

public void testLockFileExists ( ) throws IOException { Path tempDir = createTempDir ( ) ; Path lockFile = tempDir . resolve ( "test.lock" ) ; Files . createFile ( lockFile ) ; Directory dir = getDirectory ( tempDir ) ; Lock l = dir . obtainLock ( "test.lock" ) ; l . close ( ) ; dir . close ( ) ; }
verify nativefslockfactory works correctly if the lock file exists
