More test refactoring