String xmiStr = serialize(cas, null);
//deserialize into a CAS that's missing the Organization type
File partialTypeSystemFile = JUnitExtension.getFile("ExampleCas/partialTestTypeSystem.xml");
TypeSystemDescription partialTypeSystem = UIMAFramework.getXMLParser().parseTypeSystemDescription(
new XMLInputSource(partialTypeSystemFile));
testAnnotTypeDesc = partialTypeSystem.addType("org.apache.uima.testTypeSystem.TestAnnotation", "", "uima.tcas.Annotation");
testAnnotTypeDesc.addFeature("arrayFeat", "", "uima.cas.FSArray");
CAS partialTsCas = CasCreationUtils.createCas(partialTypeSystem, null, null);
XmiSerializationSharedData sharedData = new XmiSerializationSharedData();
deserialize(xmiStr, partialTsCas, sharedData, true, -1);