assertThat(tmChildren.get(0).getValue(), is("Header Prop value"));
assertThat(tmChildren.get(1).getLocalName(), is("note"));
assertThat(tmChildren.get(1).getValue(), is("Header Note value"));
// Metadata at the TU level
TransMemoryUnit tu0 =
findInCollection(tm.getTranslationUnits(), "doc0:resId0");
Map<String, String> tu0Atts = TMXMetadataHelper.getAttributes(tu0);
assertThat(tu0Atts.size(), is(4));
assertThat(tu0Atts, hasEntry("tuid", "doc0:resId0"));
assertThat(tu0Atts, hasEntry("srclang", "en"));
assertThat(tu0Atts, hasKey("creationdate"));
assertThat(tu0Atts, hasKey("changedate"));
List<Element> tu0Children = TMXMetadataHelper.getChildren(tu0);
assertThat(tu0Children.size(), is(2));
assertThat(tu0Children.get(0).getLocalName(), is("prop"));
assertThat(tu0Children.get(0).getValue(), is("Custom prop0 value"));
assertThat(tu0Children.get(1).getLocalName(), is("note"));
assertThat(tu0Children.get(1).getValue(), is("Custom note"));
TransMemoryUnit tu1 =
findInCollection(tm.getTranslationUnits(), "doc0:resId1");
Map<String, String> tu1Atts = TMXMetadataHelper.getAttributes(tu1);
assertThat(tu1Atts.size(), is(4));
assertThat(tu1Atts, hasEntry("tuid", "doc0:resId1"));
assertThat(tu1Atts, hasEntry("srclang", "en"));