MarkupUtils { public static void additionallyAnnotateAsType(Element e, String type) { addAttribute(e, ANNOTATION_TYPE_ATTRIBUTE, type); } private  MarkupUtils(); static void additionallyAnnotateAsType(Element e, String type); static void setAttribute(Element e, String key, String value); static void addAttribute(Element e, String key, String value); static String getAttribute(Element e, String key); static List<String> getAttributes(Element e, String key); static Set<String> getTypes(Element element); static final String ATTRIBUTE_VALUE_SEPARATOR; }
@Test public void testAdditionallyAnnotateAsType() { Element e = new Element(Tag.valueOf("p"), ""); MarkupUtils.additionallyAnnotateAsType(e, "testtype"); assertEquals(MarkupUtils.getAttribute(e, "types"), "testtype"); assertTrue(MarkupUtils.getTypes(e).contains("testtype")); }