Refactored client and secureClient tests.