[Migrations] refactor tests