CAS partialTsCas = CasCreationUtils.createCas(partialTypeSystem, null, indexes);
XmiSerializationSharedData sharedData2 = new XmiSerializationSharedData();
deserialize(xmiStr, partialTsCas, sharedData2, true, -1);
assertEquals(1,sharedData2.getOutOfTypeSystemElements().size());
OotsElementData ootsFeats3 = sharedData2.getOutOfTypeSystemFeatures(sharedData2.getFsAddrForXmiId(3));
assertEquals(1, ootsFeats3.attributes.size());
XmlAttribute ootsAttr = (XmlAttribute)ootsFeats3.attributes.get(0);
assertEquals("mentionType", ootsAttr.name);
assertEquals("NAME", ootsAttr.value);
OotsElementData ootsFeats5 = sharedData2.getOutOfTypeSystemFeatures(sharedData2.getFsAddrForXmiId(5));
assertEquals(0, ootsFeats5.attributes.size());
assertEquals(1, ootsFeats5.childElements.size());
XmlElementNameAndContents ootsChildElem = (XmlElementNameAndContents)
ootsFeats5.childElements.get(0);
assertEquals("mentionType", ootsChildElem.name.qName);
assertEquals("NAME", ootsChildElem.contents);
OotsElementData ootsFeats8 = sharedData2.getOutOfTypeSystemFeatures(sharedData2.getFsAddrForXmiId(8));
assertEquals(1, ootsFeats8.attributes.size());
OotsElementData ootsFeats10 = sharedData2.getOutOfTypeSystemFeatures(sharedData2.getFsAddrForXmiId(10));
assertEquals(1, ootsFeats10.attributes.size());
OotsElementData ootsFeats11 = sharedData2.getOutOfTypeSystemFeatures(sharedData2.getFsAddrForXmiId(11));
assertEquals(4, ootsFeats11.childElements.size());
String xmiStr3 = serialize(partialTsCas, sharedData2);
newCas2.reset();
deserialize(xmiStr3, newCas2, null, false, -1);