refactored client tests