@Test
public void testDeleteFileSet() throws Exception {

  ZooKeeperManager mockZKManager = mock(ZooKeeperManager.class);
  FileSetInfo fileSetInfo = new FileSetInfo();
  fileSetInfo.fileSetName = "test_fileset";
  when(mockZKManager.getFileSetInfo(eq(fileSetInfo.fileSetName))).thenReturn(fileSetInfo);
  doNothing().when(mockZKManager).lockFileSet(anyString(), any(FileSetInfo.class));
  doNothing().when(mockZKManager).setFileSetInfo(anyString(), any(FileSetInfo.class));
  TerrapinAdmin.deleteFileSet(mockZKManager, fileSetInfo.fileSetName);
  verify(mockZKManager, times(1))
      .setFileSetInfo(eq(fileSetInfo.fileSetName), any(FileSetInfo.class));
  assertTrue(fileSetInfo.deleted);
}