conf.set("fs.ha.zookeeper.cache.dir", directoryName);
conf.setBoolean("fs.ha.zookeeper.cache", false);
CachingAvatarZooKeeperClient cazkc = new CachingAvatarZooKeeperClient(conf, null);
Method m = CachingAvatarZooKeeperClient.class.getDeclaredMethod(
"tryLock", Boolean.TYPE, ZooKeeperCall.class);
ZooKeeperCall call = cazkc.new GetStat(null);
m.setAccessible(true);
FileLock fl = (FileLock) m.invoke(cazkc, true, call);
fl.release();
TestCase.assertNotNull(fl);
fl = (FileLock) m.invoke(cazkc, true, call);