getConstraint("{val, obj -> return propertyName == 'testString'}"),
"test");
}
public void testConstraintCreation() {
Constraint validatorConstraint = new ValidatorConstraint();
assertEquals(ConstrainedProperty.VALIDATOR_CONSTRAINT, validatorConstraint.getName());
assertTrue(validatorConstraint.supports(TestClass.class));
assertFalse(validatorConstraint.supports(null));
validatorConstraint.setOwningClass(TestClass.class);
validatorConstraint.setPropertyName(PROP_NAME);
try {
getConstraint("testString", "Test");
fail("ValidatorConstraint must throw an exception for non-closure parameter.");
} catch (IllegalArgumentException iae) {