public void testSetDatapointsOfgcTimeMillisValue() {
    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("jvm.metrics.gcTimeMillis");
    
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("0.0", new Long(1)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("0.0", new Long(2)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("0.0", new Long(3)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("111.0", new Long(4)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("11.0", new Long(5)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("100.0", new Long(6)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("0.0", new Long(7)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("11.0", new Long(8)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("0.0", new Long(9)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("0.0", new Long(10)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("0.0", new Long(11)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("0.0", new Long(12)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("11.0", new Long(13)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("100.0", new Long(14)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("0.0", new Long(15)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("0.0", new Long(16)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("0.0", new Long(17)));
    listTemporalMetrics.add(new GangliaMetric.TemporalMetric("0.0", new Long(18)));
    instance.setDatapointsFromList(listTemporalMetrics);
    System.out.println(instance);
    assertTrue(instance.getDatapoints().length == 11);
  }
Test of setDatapoints method, of class GangliaMetric.
ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaMetricTest.java