Added the TestMigration class.

Just moved the function from the trait in the class. 
I haven't written any unit tests for it though but given the fact that we already use the method it should be fine.