Suggestions for refactoring tests