@Test
public void testSerializeToJson() throws IOException {

  Metric diskOnHostMetric = new Metric(new ApplicationInstance("localhost", AppID.HOST, ""), "disk_free", 0);
  long timestamp = 0;
  double value = 5.35;
  diskOnHostMetric.putMetric(timestamp, Double.toString(value));
  diskOnHostMetric.putMetric(timestamp + 5000, Double.toString(value));
  diskOnHostMetric.putMetric(timestamp + 10000, Double.toString(value));
  diskOnHostMetric.putMetric(timestamp + 15000, Double.toString(value));
  String expected = SAMPLE_METRIC_IN_JSON;
  String s = new Json(true).serialize(diskOnHostMetric);
  assertEquals("Json should match", expected, s);
}