@Test(expected = IllegalArgumentException.class)
public void testDuplicateMetricName() {

  metrics.sensor("test").add(new MetricName("test", "grp1"), new Avg());
  metrics.sensor("test2").add(new MetricName("test", "grp1"), new Total());
}