AppSchemaFeatureTypeRegistry typeRegistry = new AppSchemaFeatureTypeRegistry();
try {
typeRegistry.addSchemas(schemaIndex);
Name typeName = Types.typeName(XMMLNS, "BoreholeType");
ComplexFeatureTypeImpl borehole = (ComplexFeatureTypeImpl) typeRegistry.getAttributeType(typeName);
assertNotNull(borehole);
assertTrue(borehole instanceof FeatureType);
AttributeType superType = borehole.getSuper();
assertNotNull(superType);
Name superTypeName = Types.typeName(SANS, "ProfileType");
assertEquals(superTypeName, superType.getName());
assertTrue(superType instanceof FeatureType);
// ensure all needed types were parsed and aren't just empty proxies
Collection properties = borehole.getTypeDescriptors();
assertEquals(16, properties.size());
Map expectedNamesAndTypes = new HashMap();
// from gml:AbstractFeatureType
expectedNamesAndTypes.put(name(GMLNS, "metaDataProperty"), typeName(GMLNS,
"MetaDataPropertyType"));