public void testBasics() throws IOException {
  Path tempPath=createTempDir();
  Directory dir=getDirectory(tempPath);
  Lock l=dir.obtainLock("commit");
  expectThrows(LockObtainFailedException.class,null);
  l.close();
  l=dir.obtainLock("commit");
  l.close();
  dir.close();
}

public void testBasics ( ) throws IOException { Path tempPath = createTempDir ( ) ; Directory dir = getDirectory ( tempPath ) ; Lock l = dir . obtainLock ( "commit" ) ; expectThrows ( LockObtainFailedException . class , null ) ; l . close ( ) ; l = dir . obtainLock ( "commit" ) ; l . close ( ) ; dir . close ( ) ; }
test obtaining and releasing locks , checking validity
