public void testVerifyMemberTypeConstraint() {
final MutableCollectionType collectionType =
(MutableCollectionType) getMutableInhibitor();
final MutableMemberTypeConstraint memberTypeConstraint =
CONSTRAINT_FACTORY.createMemberTypeConstraint();
memberTypeConstraint.setMemberType(TYPE_FACTORY.createStringType());
collectionType.setMemberTypeConstraint(memberTypeConstraint);
// check constraint with right value
final MutableCollectionValue collectionValue =
createCollectionValue(new String[]{"one", "two"});
Collection errors = collectionType.verify(collectionValue);
assertEquals(0, errors.size());
// check constraint violation
memberTypeConstraint.setMemberType(TYPE_FACTORY.createBooleanType());
collectionType.setMemberTypeConstraint(memberTypeConstraint);
errors = collectionType.verify(collectionValue);
assertEquals(4, errors.size());
MutableStringValue stringValue = VALUE_FACTORY.createStringValue();