### Question:
Ganglia { public ArrayList<Cluster> getGridInfo() { String gangliaXml = null; ArrayList<Cluster> grid = new ArrayList<Cluster>(); try { ParseGanglia p = new ParseGanglia(gangliaCollectorIP, gangliaPort, gangliaPortQuery); gangliaXml = p.getGangliaXml(); grid = (ArrayList<Cluster>) p.parseGangliaXml(gangliaXml); } 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 gridTest() { System.out.println("----- GridTest -----"); Ganglia g = new Ganglia(); ArrayList<Cluster> cluster_list; cluster_list = g.getGridInfo(); for (Cluster cluster : cluster_list) { System.out.println("Cluster Name: " + cluster.getName()); List<Host> hosts = cluster.getHosts(); for (Host host : hosts) { Assert.assertTrue(host.getLoadFive() >= 0); Assert.assertTrue(host.getLoadFifteen() >= 0); Assert.assertTrue(host.getCPUUser() >= 0); Assert.assertTrue(host.getCPUNice() >= 0); Assert.assertTrue(host.getCPUSystem() >= 0); Assert.assertTrue(host.getCPUIdle() >= 0); Assert.assertTrue(host.getCPUWio() >= 0); Assert.assertTrue(host.getDiskTotal() >= 0); Assert.assertTrue(host.getDiskFree() >= 0); Assert.assertTrue(host.getDiskUsed() >= 0); } } System.out.println("----------"); }