public final void testSetRegex(){
  RegexConstraint regexConstraint=new RegexConstraint(Pattern.compile("."));
  regexConstraint.setRegex(REGEX);
  assertEquals(REGEX,regexConstraint.getRegex());
}

public final void testSetRegex ( ) { RegexConstraint regexConstraint = new RegexConstraint ( Pattern . compile ( "." ) ) ; regexConstraint . setRegex ( REGEX ) ; assertEquals ( REGEX , regexConstraint . getRegex ( ) ) ; }
tests the functionality of the method , which allows to set the regular expression .
