CAS cas1 = CasCreationUtils.createCas(l);
cas1.setDocumentText("foo");
CASCompleteSerializer ser = Serialization.serializeCASComplete((CASMgr) cas1);
CAS tcas2 = CasCreationUtils.createCas(new TypeSystemDescription_impl(), null, null);
CASImpl cas2 = ((CASImpl) tcas2).getBaseCAS();
tcas2.setDocumentText("bar");
// reinit
cas2.reinit(ser);
CAS tcas3 = cas2.getCurrentView();
assertTrue(tcas2 == tcas3);
assertNotNull(cas1.getTypeSystem().getType("NamedEntity"));
assertNotNull(tcas3.getTypeSystem().getType("NamedEntity"));