Refactor internal into shared client tests