public @Test final void createFeatureTypeNillability() {
FeatureTypeFactory ftf = CommonFactoryFinder.getFeatureTypeFactory(null);
Name attName1 = new NameImpl("int_Type");
Name attName2 = new NameImpl("string_Type");
Class<?> binding = Integer.class;
boolean isIdentifiable = false;
boolean isAbstract = false;
List<Filter> restrictions = null;
AttributeType superType = null;
InternationalString description = null;
AttributeType attribute1 = ftf.createAttributeType(attName1, binding, isIdentifiable,
isAbstract, restrictions, superType, description);
AttributeType attribute2 = ftf.createAttributeType(attName2, binding, isIdentifiable,
isAbstract, restrictions, superType, description);
int minOccurs = 0;
int maxOccurs = 1;
boolean isNillable = true;
Object defaultValue = null;
AttributeDescriptor descriptor1 = ftf.createAttributeDescriptor(attribute1,
attribute1.getName(), minOccurs, maxOccurs, isNillable, defaultValue);
isNillable = false;
AttributeDescriptor descriptor2 = ftf.createAttributeDescriptor(attribute2,
attribute2.getName(), minOccurs, maxOccurs, isNillable, defaultValue);
SimpleFeatureTypeBuilder sftb = new SimpleFeatureTypeBuilder(ftf);
sftb.add(descriptor1);
sftb.add(descriptor2);
sftb.setName(new NameImpl("SimpleName"));
SimpleFeatureType featureType = sftb.buildFeatureType();
testCreateFeatureType(id1, featureType);
}