@TestForIssue(jiraKey = "HV-406")
public void explicit_regular_expression_can_be_specified_via_programmatic_configuration() {
// now the same test with programmatic configuration
HibernateValidatorConfiguration config = ValidatorUtil.getConfiguration( HibernateValidator.class );
ConstraintMapping mapping = config.createConstraintMapping();
mapping.type( URLContainer.class )
.property( "url", METHOD )
.constraint( new URLDef().regexp( "^http://\\S+[\\.htm|\\.html]{1}$" ) );
config.addMapping( mapping );
Validator validator = config.buildValidatorFactory().getValidator();