What I do to test hibernate mappings is create a test database, with a certain set of test data, then write tests that start a transaction at the beginning of the test then rollback at the end. In the test, I can to get, find, save, delete, etc., assert the objects returned from the hibernate DAO methods are correct, and then any changes are rolled back. I acutally keep two database schemas, one for running the unit tests and another for running the whole webapp against, so that the test data never changes. If you use Spring,
AbstractTransactionalDataSourceSpringContextTests handles all of the transaction rollback stuff for you.