added test and suppporting code for passing in a custom transport to
the Client