Refactoring imex test.