test migrate references: refactore and test order is not restored