srcCasView.setDocumentText("This is a test");
CAS destCas = CasCreationUtils.createCas(typeSystem, new TypePriorities_impl(), indexes);
LowLevelCAS lowLevelSrcCasView = srcCasView.getLowLevelCAS();
int typeCode = lowLevelSrcCasView.ll_getTypeSystem().ll_getCodeForType(
srcCas.getAnnotationType());
int destFsAddr = lowLevelSrcCasView.ll_createFS(typeCode);
AnnotationFS fs = (AnnotationFS) lowLevelSrcCasView.ll_getFSForRef(destFsAddr);
fs.setIntValue(srcCas.getBeginFeature(), 0);
fs.setIntValue(srcCas.getEndFeature(), 4);
assertEquals("This", fs.getCoveredText());
srcCasView.addFsToIndexes(fs);