MonitoringInfoMetricName extends MetricName { public static MonitoringInfoMetricName named(String urn, HashMap<String, String> labels) { return new MonitoringInfoMetricName(urn, labels); } private  MonitoringInfoMetricName(String urn, Map<String, String> labels); @Override String getNamespace(); @Override String getName(); String getUrn(); Map<String, String> getLabels(); static MonitoringInfoMetricName of(MetricsApi.MonitoringInfo mi); static MonitoringInfoMetricName named(String urn, HashMap<String, String> labels); @Override int hashCode(); @Override boolean equals(@Nullable Object o); @Override String toString();  }
@Test public void testNullLabelsThrows() { thrown.expect(IllegalArgumentException.class); HashMap<String, String> labels = null; MonitoringInfoMetricName.named(MonitoringInfoConstants.Urns.ELEMENT_COUNT, labels); }
@Test public void testNullUrnThrows() { HashMap<String, String> labels = new HashMap<String, String>(); thrown.expect(IllegalArgumentException.class); MonitoringInfoMetricName.named(null, labels); }
@Test public void testEmptyUrnThrows() { HashMap<String, String> labels = new HashMap<String, String>(); thrown.expect(IllegalArgumentException.class); MonitoringInfoMetricName.named("", labels); }