@Test(expected = IllegalArgumentException.class)
public void testGetRegexValidatorWithInvalidPatternThrowsException() {

  DefaultValidatorFactory factory = new DefaultValidatorFactory();
  factory.get("RegexValidator", "[a-z");
}