Refactored account tests