{
if (field.isAnnotationPresent(PropertyType.class))
{
if (!field.get(schema).equals(property))
{
PropertyType pt = field.getAnnotation(PropertyType.class);
if (pt.type() == Types.LangAlt)
{
// do not check method existence
}
else if (pt.type() == Types.Thumbnail && pt.card() == Cardinality.Alt)
{
// do not check method existence
}
else if (pt.type() == Types.ResourceRef)
{
// do not check method existence
}
else if (pt.type() == Types.Version && pt.card() == Cardinality.Seq)
{
// do not check method existence
}
else
{
// type test
PropertyType spt = retrievePropertyType(field.get(schema).toString());
String getNameProperty = "get" + prepareName(field.get(schema).toString(), spt) + "Property";
Method getMethod = schemaClass.getMethod(getNameProperty);
Assert.assertNull(getNameProperty + " should return null when testing " + property,
getMethod.invoke(schema));
// value test