What is it that we need to do in practice?

Create a source set on which the examples are based on. See also https://github.com/hibernate/hibernate-validator/tree/master/documentation/src/test/java/org/hibernate/validator/referenceguide
Think Manning book where you can download the accompanying code examples.

As far as I know, all code snippets in the documentation are extracts from the unit tests.

Not all and if they are it is not sure form where they are taken.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira