Refactor account tests