### Question:
Ganglia { public ClusterSummary getClusterSummaryInfo(String clusterName) { ClusterSummary grid = null; try { ParseGanglia p = new ParseGanglia(gangliaCollectorIP, gangliaPort, gangliaPortQuery); String xml = p.queryGanglia("/" + clusterName + GangliaMetKeys.QUERY_SUMMARY); grid = p.parseGangliaSummaryXml(xml); } catch (MonitoringException ex) { Logger.getLogger(Ganglia.class.getName()).log(Level.SEVERE, null, ex); } return grid; } Ganglia(); ArrayList<Cluster> getGridInfo(); Cluster getClusterInfo(String clusterName); Host getHostInfo(String clusterName, String hostName); ClusterSummary getClusterSummaryInfo(String clusterName); void fetchData(String clusterName, String hostName, String metric, Integer startTime);  }### Answer:
@Test public void clusterSummaryTest() { System.out.println("----- clusterSummaryTest -----"); Ganglia g = new Ganglia(); ClusterSummary summary = g.getClusterSummaryInfo(clusterName); if (summary == null) { System.out.println("It has not been possible to retrieve summary information"); } else { System.out.println("Number of aggregated metrics : " + summary.getMetrics().size()); } System.out.println("----------"); }