/**
* Build the feature properties
*/
// eg:simpleAttribute
AttributeDescriptor simpleAttributeDesc = (AttributeDescriptor) fType.getDescriptor(SIMPLE_ATTRIBUTE);
AttributeImpl simpleAttribute = new AttributeImpl("simple value", simpleAttributeDesc, null);
properties.add(simpleAttribute);
// eg:complexAttribute/eg:rootAttribute[1]
Collection<Property> rootPropertiesOne = new ArrayList<Property>();
AttributeDescriptor multiLeafDesc = (AttributeDescriptor) rootAttType.getDescriptor(MULTI_LEAF_ATTRIBUTE);
// eg:complexAttribute/eg:rootAttribute[1]/eg:multiLeafAttribute[1]
AttributeImpl leafOne = new AttributeImpl("multi leaf value 1", multiLeafDesc, null);
rootPropertiesOne.add(leafOne);
// eg:complexAttribute/eg:rootAttribute[1]/eg:multiLeafAttribute[2]
AttributeImpl leafTwo = new AttributeImpl("multi leaf value 2", multiLeafDesc, null);
rootPropertiesOne.add(leafTwo);
// eg:complexAttribute/eg:rootAttribute[1]/eg:singleLeafAttribute
AttributeDescriptor singleLeafDesc = (AttributeDescriptor) rootAttType.getDescriptor(SINGLE_LEAF_ATTRIBUTE);
AttributeImpl singleLeaf = new AttributeImpl("single leaf value", singleLeafDesc, null);
rootPropertiesOne.add(singleLeaf);
//NC- add, test xml-attribute
Map<Name, Object> userData = new HashMap<Name, Object>();
singleLeaf.getUserData().put(Attributes.class, userData);
userData.put(Types.typeName(EG, "att"), "test attribute");
AttributeImpl rootOne = new ComplexAttributeImpl(rootPropertiesOne, rootDesc, null);
// eg:complexAttribute/eg:rootAttribute[2]
Collection<Property> rootPropertiesTwo = new ArrayList<Property>();
// eg:complexAttribute/eg:rootAttribute[2]/eg:multiLeafAttribute[1]
rootPropertiesTwo.add(leafOne);
rootPropertiesTwo.add(singleLeaf);
AttributeImpl rootTwo = new ComplexAttributeImpl(rootPropertiesTwo, rootDesc, null);
// eg:complexAttribute/eg:rootAttribute[3]
Collection<Property> rootPropertiesThree = new ArrayList<Property>();
// eg:complexAttribute/eg:rootAttribute[3]/eg:singleLeafAttribute
rootPropertiesThree.add(singleLeaf);
AttributeImpl rootThree = new ComplexAttributeImpl(rootPropertiesThree, rootDesc, null);
Collection<Property> complexProperties = new ArrayList<Property>(2);
complexProperties.add(rootOne);
complexProperties.add(rootTwo);
complexProperties.add(rootThree);
AttributeImpl complexAttribute = new ComplexAttributeImpl(complexProperties,
complexDesc, null);
properties.add(complexAttribute);
Feature feature = new FeatureImpl(properties, fType, new FeatureIdImpl("test1"));