### Question:
Tag { public static Tag valueOf(String tagName) { Validate.notNull(tagName); tagName = tagName.trim().toLowerCase(); Validate.notEmpty(tagName); synchronized (tags) { Tag tag = tags.get(tagName); if (tag == null) { tag = new Tag(tagName); tag.setAncestor(defaultAncestor.tagName); tag.setExcludes(); tag.isBlock = false; tag.canContainBlock = true; } return tag; } } private  Tag(String tagName); String getName(); static Tag valueOf(String tagName); boolean isBlock(); boolean formatAsBlock(); boolean canContainBlock(); boolean isInline(); boolean isData(); boolean isEmpty(); boolean isSelfClosing(); boolean isKnownTag(); boolean preserveWhitespace(); @Override boolean equals(Object o); @Override int hashCode(); String toString();  }### Answer:
@Test public void isCaseInsensitive() { Tag p1 = Tag.valueOf("P"); Tag p2 = Tag.valueOf("p"); assertEquals(p1, p2); }
@Test public void trims() { Tag p1 = Tag.valueOf("p"); Tag p2 = Tag.valueOf(" p "); assertEquals(p1, p2); }
@Test(expected = IllegalArgumentException.class) public void valueOfChecksNotNull() { Tag.valueOf(null); }
@Test(expected = IllegalArgumentException.class) public void valueOfChecksNotEmpty() { Tag.valueOf(" "); }