SystemManager refactoring: move query in it's own method and remove duplication
MigrationManagerTest: remove unnecessary set up code
MigrationManagerTest: fix Hibernate problem that prevented the test to run correctly