Set<ConstraintDescriptor<?>> composingDescriptors = descriptor.getComposingConstraints();
assertEquals( composingDescriptors.size(), 2, "Wrong number of composing constraints" );
for ( ConstraintDescriptor<?> desc : composingDescriptors ) {
if ( desc.getAnnotation().annotationType().equals( Size.class ) ) {
Size sizeAnn = ( Size ) desc.getAnnotation();
assertEquals( sizeAnn.min(), 5, "The min parameter should reflect the overriden parameter" );
assertEquals(
desc.getAttributes().get( "min" ), 5, "The min parameter should reflect the overriden parameter"
);
}
else if ( desc.getAnnotation().annotationType().equals( NotNull.class ) ) {