TransUnitImpl extends XliffElementImpl implements TransUnit { @Override public List<? extends Node> getChildren() { ArrayList<Element> children = new ArrayList<Element>(); children.add(source); if (segSource != null) { children.add(segSource); } if (target != null) { children.add(target); } children.addAll(context); children.addAll(nonXliffElements); return children; } TransUnitImpl(Id id, Source source);  TransUnitImpl(org.w3c.dom.Element element); @Override List<? extends Node> getChildren(); Approved getApproved(); CharClass getCharClass(); List<? extends Context> getContext(); Coord getCoord(); CssStyle getCssStyle(); DataType getDataType(); ExStyle getExStyle(); ExType getExType(); ExtraData getExtraData(); Font getFont(); HelpId getHelpId(); Id getId(); MaxBytes getMaxBytes(); MaxHeight getMaxHeight(); MaxWidth getMaxWidth(); Menu getMenu(); MenuName getMenuName(); MenuOption getMenuOption(); MinBytes getMinBytes(); MinHeight getMinHeight(); MinWidth getMinWidth(); Collection<NonXliffAttribute> getNonXliffAttributes(); List<NonXliffElement> getNonXliffElements(); PhaseName getPhaseName(); Reformat getReformat(); ResName getResName(); Target getTarget(); ResType getResType(); SegSource getSegSource(); SizeUnit getSizeUnit(); Source getSource(); Style getStyle(); Translate getTranslate(); com.sap.mlt.xliff12.api.attribute.Ts getTs(); XmlSpace getXmlSpace(); void setApproved(Approved approved); void setCharClass(CharClass charClass); void setContext(List<? extends Context> context); void setCoord(Coord coord); void setCssStyle(CssStyle cssStyle); void setDataType(DataType dataType); void setExStyle(ExStyle exStyle); void setExType(ExType exType); void setExtraData(ExtraData extraData); void setFont(Font font); void setHelpId(HelpId helpId); void setId(Id id); void setMaxBytes(MaxBytes maxBytes); void setMaxHeight(MaxHeight maxHeight); void setMaxWidth(MaxWidth maxWidth); void setMenu(Menu menu); void setMenuName(MenuName menuName); void setMenuOption(MenuOption menuOption); void setMinBytes(MinBytes minBytes); void setMinHeight(MinHeight minHeight); void setMinWidth(MinWidth minWidth); void setNonXliffAttributes(
			Collection<NonXliffAttribute> nonXliffAttributes); void setNonXliffElements(List<NonXliffElement> nonXliffElements); void setPhaseName(PhaseName phaseName); void setReformat(Reformat reformat); void setResName(ResName resName); void setResType(ResType resType); void setSegSource(SegSource segSource); void setSizeUnit(SizeUnit sizeUnit); void setSource(Source source); void setStyle(Style style); void setTarget(Target target); void setTranslate(Translate translate); void setTs(com.sap.mlt.xliff12.api.attribute.Ts ts); void setXmlSpace(XmlSpace xmlSpace);  }
@Test public void testGetChildren() { TransUnitImpl tu = createDefaultTransUnit(); tu.setSegSource(createDefaultSegSource()); tu.setTarget(createDefaultTarget()); ArrayList<TransUnit.Context> context = new ArrayList<TransUnit.Context>(); context.add(createDefaultContextGroup()); context.add(createDefaultCountGroup()); context.add(createDefaultPropGroup()); context.add(createDefaultNote()); context.add(createDefaultAltTrans()); tu.setContext(context); ArrayList<NonXliffElement> nxes = new ArrayList<NonXliffElement>(); nxes.add(createDefaultNonXliffElement()); tu.setNonXliffElements(nxes); List<? extends Node> children = tu.getChildren(); assertEquals(new Integer(9), new Integer(children.size())); }