Some test refactoring.