@Test
public void testCalcOverallOnlinePercentageGauge() {

  FileSetInfo mockFileSetInfo2 = mock(FileSetInfo.class);
  FileSetInfo.ServingInfo mockServingInfo2 = mock(FileSetInfo.ServingInfo.class);
  ViewInfo mockViewInfo2 = mock(ViewInfo.class);
  mockFileSetInfo2.servingInfo = mockServingInfo2;
  when(mockZKManager.getFileSetInfoMap())
      .thenReturn(ImmutableMap.of("file_set1", mockFileSetInfo, "file_set2", mockFileSetInfo2));
  when(mockZKManager.getFileSetInfo(eq("file_set1"))).thenReturn(mockFileSetInfo);
  when(mockZKManager.getFileSetInfo(eq("file_set2"))).thenReturn(mockFileSetInfo2);
  when(mockZKManager.getViewInfo("file_set1")).thenReturn(mockViewInfo);
  when(mockZKManager.getViewInfo("file_set2")).thenReturn(mockViewInfo2);
  when(mockViewInfo.getNumOnlinePartitions()).thenReturn(4);
  when(mockViewInfo2.getNumOnlinePartitions()).thenReturn(5);
  mockServingInfo.helixResource = "file_set1";
  mockServingInfo2.helixResource = "file_set2";
  mockServingInfo.numPartitions = 20;
  mockServingInfo2.numPartitions = 16;
  assertEquals(0.25, GaugeManager.calcOverallOnlinePercentageGauge(mockZKManager), 0);
}