@Test
public void testGetLoadingFileSetTable() {

  try{
    when(mockZKManager.getLockedFileSets()).thenReturn(ImmutableList.of(
        "fileset1", "fileset2", "fileset3"
    ));
    when(mockZKManager.getLockedFileSetInfo(eq("fileset1"))).thenReturn(mockFileSetInfo1);
    when(mockZKManager.getLockedFileSetInfo(eq("fileset2"))).thenReturn(mockFileSetInfo2);
    when(mockZKManager.getLockedFileSetInfo(eq("fileset3"))).thenReturn(mockFileSetInfo3);
    List<ClusterStatusServlet.FileSetWithErrorRow> fileSetsWithError =
        new ArrayList<ClusterStatusServlet.FileSetWithErrorRow>();
    List<ClusterStatusServlet.LoadingFileSetRow> loadingFileSets =
        ClusterStatusServlet.getLoadingFileSetTable(mockZKManager, fileSetsWithError);
    assertEquals(2, loadingFileSets.size());
    assertEquals(
        new ClusterStatusServlet.LoadingFileSetRow("fileset1", "/fileset1/1234423233333"),
        loadingFileSets.get(0)
    );
    assertEquals(
        new ClusterStatusServlet.LoadingFileSetRow("fileset2", "/fileset2/1344423233333"),
        loadingFileSets.get(1)
    );
    assertEquals(1, fileSetsWithError.size());
    assertEquals(
        new ClusterStatusServlet.FileSetWithErrorRow("fileset3",
            ClusterStatusServlet.FileSetError.NO_SERVING_INFO),
        fileSetsWithError.get(0)
    );
  } catch (Exception e) {
    fail(e.getMessage());
  }
}