@Test
public void testLockFileSet() throws Exception {

  ZooKeeperManager mockZKManager = mock(ZooKeeperManager.class);
  FileSetInfo fileSetInfo = new FileSetInfo();
  String fileSet = "test_fileset";
  when(mockZKManager.getFileSetInfo(eq(fileSet))).thenReturn(fileSetInfo);
  doNothing().when(mockZKManager).lockFileSet(anyString(), any(FileSetInfo.class),
      eq(CreateMode.EPHEMERAL));
  TerrapinAdmin.lockFileSet(mockZKManager, fileSet);
  verify(mockZKManager, times(1)).lockFileSet(eq(fileSet), eq(fileSetInfo),
      eq(CreateMode.EPHEMERAL));
}