MetricId implements Comparable<MetricId> { public Map<String, String> getTags() { return tags; } MetricId();  MetricId(String key);  MetricId(String key, Map<String, String> tags); @Deprecated @VisibleForTesting  MetricId(String key, SortedMap<String, String> tags); private  MetricId(String key, SortedMap<String, String> tags, boolean isAlreadyUnmodifiable); String getKey(); Map<String, String> getTags(); MetricId resolve(final String part); MetricId tagged(Map<String, String> add); MetricId tagged(String... pairs); MetricId tagged(String k1, String v1); MetricId tagged(String k1, String v1, String k2, String v2); MetricId tagged(String k1, String v1, String k2, String v2, String k3, String v3); static MetricId join(MetricId... parts); static MetricId build(final String... parts); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(MetricId o); static final String SEPARATOR; static final SortedMap<String, String> EMPTY_TAGS; static final MetricId EMPTY; }
@Test(expected = UnsupportedOperationException.class) public void testReadOnlyTags1() { MetricId.EMPTY.getTags().put("x", "y"); }