Refactored tests and test support file so the MigrationController tests can be exported and reused