Avoid deprecation warnings in ValidatorFactoryTests

ValidatorFactoryTests now uses Bean Validation 1.1 APIs where
appropriate.