@Test
  public void testSetDatapointsOfPercentValue() {
    System.out.println("setDatapoints");
    List<GangliaMetric.TemporalMetric> listTemporalMetrics =
      new ArrayList<>();
    GangliaMetric instance = new GangliaMetric();
    instance.setDs_name("dsName");
    instance.setCluster_name("c1");
    instance.setHost_name("localhost");
    instance.setMetric_name("cpu_wio");
    
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("111.0", new Long(1362440880)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("11.0", new Long(1362440881)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("100.0", new Long(1362440882)));
    instance.setDatapointsFromList(listTemporalMetrics);
    assertTrue(instance.getDatapoints().length == 2);
  }
Test of setDatapoints method, of class GangliaMetric.
ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaMetricTest.java