final MetaData metaData = (MetaData) metaDataMap.get("fragment-link-id");
DOMOutputBuffer value = (DOMOutputBuffer) metaData.getPropertyValue(
MetaPropertyHandlerFactory.FRAGMENT_LINK_LABEL);
assertNotNull(value);
Text head = (Text) value.getRoot().getHead();
assertEquals("link text 1",
new String(head.getContents(), 0, head.getLength()));
Element heading = (Element) head.getNext();
Text headingText = (Text) heading.getHead();
assertEquals("link heading",
new String(headingText.getContents(), 0, headingText.getLength()));
Text tail = (Text) heading.getNext();
assertEquals("link text 2",
new String(tail.getContents(), 0, tail.getLength()));
assertNull(tail.getNext());
value = (DOMOutputBuffer) metaData.getPropertyValue(
MetaPropertyHandlerFactory.ENCLOSING_FRAGMENT_LINK_LABEL);
assertNotNull(value);
head = (Text) value.getRoot().getHead();