{
if (cardinality != Cardinality.Simple)
return;
String setter = TypeTestingHelper.calculateSimpleSetter(fieldName) + "Property";
Object value = TypeTestingHelper.getJavaValue(type);
AbstractSimpleProperty asp = typeMapping.instanciateSimpleProperty(getSchema().getNamespace(), getSchema()
.getPrefix(), fieldName, value, type);
Method set = getSchemaClass().getMethod(setter, new Class<?>[] { type.getImplementingClass() });
set.invoke(getSchema(), new Object[] { asp });
// check property set
AbstractSimpleProperty stored = (AbstractSimpleProperty) getSchema().getProperty(fieldName);
Assert.assertEquals(value, stored.getValue());
// check getter
String getter = TypeTestingHelper.calculateSimpleGetter(fieldName) + "Property";
Method get = getSchemaClass().getMethod(getter, new Class[0]);
Object result = get.invoke(getSchema(), new Object[0]);
Assert.assertTrue(type.getImplementingClass().isAssignableFrom(result.getClass()));