Name fName = new NameImpl(EG, "complexFeatureType");
Collection<PropertyDescriptor> schema = new ArrayList<PropertyDescriptor>();
// add simple attribute
AttributeType attType = new AttributeTypeImpl(SIMPLE_ATTRIBUTE, String.class, false, false,
Collections.EMPTY_LIST, null, null);
AttributeDescriptor attDesc = new AttributeDescriptorImpl(attType, SIMPLE_ATTRIBUTE, 0, 1,
true, null);
schema.add(attDesc);
// build nested attributes
Collection<PropertyDescriptor> rootProperties = new ArrayList<PropertyDescriptor>();
attType = new AttributeTypeImpl(SINGLE_LEAF_ATTRIBUTE, String.class, false, false,
Collections.EMPTY_LIST, null, null);
attDesc = new AttributeDescriptorImpl(attType, SINGLE_LEAF_ATTRIBUTE, 0, 1, true, null);
rootProperties.add(attDesc);
attType = new AttributeTypeImpl(MULTI_LEAF_ATTRIBUTE, String.class, false, false,
Collections.EMPTY_LIST, null, null);
attDesc = new AttributeDescriptorImpl(attType, MULTI_LEAF_ATTRIBUTE, 0, -1, true, null);
rootProperties.add(attDesc);
attType = new ComplexTypeImpl(ROOT_ATTRIBUTE, rootProperties, false, false,