JSONMetric gaugeJsonMetric = new JSONMetric();
gaugeJsonMetric.setType("gauge");
gaugeJsonMetric.setName("foo.bar.baz.gaugemetric" + Math.random());
gaugeJsonMetric.setTimestamp((int) System.currentTimeMillis() / 1000);
Gauge gauge = (Gauge) metricCatcher.createMetric(gaugeJsonMetric);
metricCatcher.updateMetric(gauge, 100);
assertEquals((long) 100, gauge.value());
metricCatcher.updateMetric(gauge, 7);
assertEquals((long) 7, gauge.value());
}