ZooKeeperManager { public void unlockFileSet(String fileSet) throws ZooKeeperClient.ZooKeeperConnectionException, KeeperException, InterruptedException { zkClient.get().delete(getFileSetLockPath(fileSet), -1); } ZooKeeperManager(ZooKeeperClient zkClient, String clusterName); void createClusterPaths(); void registerWatchAllFileSets(); void lockFileSet(String fileSet,
                          FileSetInfo fileSetInfo,
                          CreateMode mode); void lockFileSet(String fileSet,
                          FileSetInfo fileSetInfo); void unlockFileSet(String fileSet); void setFileSetInfo(String fileSet,
                             FileSetInfo fileSetInfo); void deleteFileSetInfo(String fileSet); FileSetInfo getFileSetInfo(String fileSet); ViewInfo getViewInfo(String resource); void setViewInfo(ViewInfo viewInfo); void deleteViewInfo(String resource); FileSetInfo getFileSetInfoForced(String fileSet); FileSetInfo getLockedFileSetInfo(String fileSet); Map<String, Pair<FileSetInfo, FileSetInfo>> getCandidateHdfsDirMap(); InetSocketAddress getControllerLeader(); ClusterInfo getClusterInfo(); void setClusterInfo(ClusterInfo info); Map<String, FileSetInfo> getFileSetInfoMap(); List<String> getLockedFileSets(); List<String> getLiveInstances();  }
@Test public void testUnlockFileSet() throws Exception { doNothing().when(zk).delete(anyString(), anyInt()); ArgumentCaptor<String> pathCaptor = ArgumentCaptor.forClass(String.class); ArgumentCaptor<Integer> versionCaptor = ArgumentCaptor.forClass(Integer.class); zkManager.unlockFileSet(FILE_SET); verify(zk).delete(pathCaptor.capture(), versionCaptor.capture()); assertEquals(FILE_SET_LOCK_PATH, pathCaptor.getValue()); assertEquals(new Integer(-1), versionCaptor.getValue()); }