TagUtils { public static TagValue createTagValue(String v) { if (isTagValueValid(v)) { return TagValue.create(v); } printWarningOnce(); return TagValue.create("<invalid>"); } private  TagUtils(); static TagValue createTagValue(String v);  }
@Test public void createTagValue_tooLong() { assertThat(TagUtils.createTagValue("this-value-is-over-255-characters-long ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------")) .isEqualTo(TagValue.create("<invalid>")); }
@Test public void createTagValue_nonPrintableCharacter() { assertThat(TagUtils.createTagValue("non-printable-character-\u007f")) .isEqualTo(TagValue.create("<invalid>")); }
@Test public void createTagValue() { assertThat(TagUtils.createTagValue("my-tag-value")).isEqualTo(TagValue.create("my-tag-value")); }