@Test
public void testClusterMetricsMerge() {

  ArrayList<GetClusterMetricsResponse> responses = new ArrayList<>();
  responses.add(getClusterMetricsResponse(1));
  responses.add(getClusterMetricsResponse(2));
  GetClusterMetricsResponse result = RouterYarnClientUtils.merge(responses);
  YarnClusterMetrics resultMetrics = result.getClusterMetrics();
  Assert.assertEquals(3, resultMetrics.getNumNodeManagers());
  Assert.assertEquals(3, resultMetrics.getNumActiveNodeManagers());
  Assert.assertEquals(3, resultMetrics.getNumDecommissionedNodeManagers());
  Assert.assertEquals(3, resultMetrics.getNumLostNodeManagers());
  Assert.assertEquals(3, resultMetrics.getNumRebootedNodeManagers());
  Assert.assertEquals(3, resultMetrics.getNumUnhealthyNodeManagers());
}