use unitOfWork in tests
fix test: added mock ClassMetaData object
Merge branch 'refs/heads/master' into 2.1