Identifier { public String toDns() { return id.replace('_', '-'); } @JsonCreator  Identifier(String id); String toDns(); @Override String toString(); @JsonValue String id(); String capitalizedType(); void validate(); @Override boolean equals(Object o); @Override int hashCode(); static void throwInvalidId(String id, String explanation);  }
@Test public void dns_names_has_no_underscore() { assertEquals("a-b-c", new ApplicationId("a_b_c").toDns()); }