// use featurePath object with an different type than used for typeInit()
// and the case that type used for typeInit() has and featurePath that is
// not always valid
featurePath = new FeaturePathImpl();
try {
featurePath.initialize("/refFeature/stringFeature");
featurePath.typeInit(cas.getDocumentAnnotation().getType());
Type testAnnotType = cas.getTypeSystem().getType(
"uima.tt.TestAnnotation");
AnnotationFS fs = cas.createAnnotation(testAnnotType, 0, 1);