Refactoring Tests and Traits