@Test
public void testIsValidForEmptyStringRegexp() {
AnnotationDescriptor<Pattern> descriptor = new AnnotationDescriptor<Pattern>( Pattern.class );
descriptor.setValue( "regexp", "|^.*foo$" );
descriptor.setValue( "message", "pattern does not match" );
Pattern p = AnnotationFactory.create( descriptor );
PatternValidator constraint = new PatternValidator();
constraint.initialize( p );
assertTrue( constraint.isValid( null, null ) );