client refactor tests