Some test refactoring