ConsoleMetricSender implements MetricSender { @Override public void sendMetric(MetricInfo metric, Double value) { LOGGER.info("Sending metric {}/{} with value {} {} {}", metric.getNamespace(), metric.getMetric(), value, metric.getUnit(), metric.getDimensions().toString()); }  @Override void sendMetric(MetricInfo metric, Double value);  }
@Test public void sendMetric() throws Exception { final String ns = "My/Namespace"; final String metric = "Test metric"; final MetricUnit unit = MetricUnit.Count; final String dimensionName = "id"; final String dimensionValue = "someId"; MetricInfo info = new MetricInfo(ns, metric, unit); info.withDimension(dimensionName, dimensionValue); final int val = new Random().nextInt(100); this.sender.sendMetric(info, (double) val); }