SubImpl extends XliffElementImpl implements Sub { public List<? extends TextFragment> getContent() { return Collections.unmodifiableList(content); } SubImpl(List<? extends TextFragment> content);  SubImpl(Element element); @Override List<? extends Node> getChildren(); List<? extends TextFragment> getContent(); CtypeDelim getCtype(); DataType getDataType(); Xid getXid(); void setContent(List<? extends TextFragment> content); void setCtype(CtypeDelim ctype); void setDataType(DataType dataType); void setXid(Xid xid); String getPlainText();  }
@Test public void testSubImplIdListOfQextendsTextFragment() { SubImpl sub = createDefaultSub(); assertEquals(createDefaultContent(), sub.getContent()); }
@Test public void testSubImplElement() { Document doc = Utils.createDocument(); Element elem = doc.createElementNS(XLIFF_12_NAMESPACE, "sub"); List<TextFragment> fragments = createDefaultContent(); for (TextFragment fragment : fragments) { elem.appendChild(fragment.asXmlNode(doc)); } try { SubImpl sub = new SubImpl(elem); assertEquals(createDefaultContent(), sub.getContent()); } catch (ConstraintViolationException e) { fail("Did not expect ConstraintViolationException"); } }