@Test
public void testGetClientRequestLatencies()
    throws InterruptedException, ReaperException, JMException, IOException, ClassNotFoundException {

  AppContext cxt = new AppContext();
  ClusterFacade clusterFacadeMock = Mockito.mock(ClusterFacade.class);
  Mockito.when(clusterFacadeMock.getClientRequestLatencies(any())).thenReturn(Collections.EMPTY_LIST);
  cxt.config = new ReaperApplicationConfiguration();
  cxt.config.setJmxConnectionTimeoutInSeconds(10);
  cxt.jmxConnectionFactory = mock(JmxConnectionFactory.class);
  JmxProxy jmx = (JmxProxy) mock(Class.forName("io.cassandrareaper.jmx.JmxProxyImpl"));
  when(cxt.jmxConnectionFactory.connectAny(any(Collection.class))).thenReturn(jmx);
  MBeanServerConnection serverConn = mock(MBeanServerConnection.class);
  JmxProxyTest.mockGetMBeanServerConnection(jmx, serverConn);
  // @todo capture objectName and return valid set of objectNames,
  // to properly test MetricsProxy.collectMetrics(..) and MetricsService.convertToMetricsHistogram(..)
  when(serverConn.queryNames(Mockito.any(ObjectName.class), Mockito.isNull())).thenReturn(Collections.emptySet());
  Node node = Node.builder().withHostname("127.0.0.1").build();
  MetricsService.create(cxt, () -> clusterFacadeMock).getClientRequestLatencies(node);
  Mockito.verify(clusterFacadeMock, Mockito.times(1)).getClientRequestLatencies(Mockito.any());
}