client/WIP: Add tests

Work in progress, please do not merge yet.

Submitting this to see what you think of the testing. Should I test more/less? Does the test style seem OK?

I'll add more tests tomorrow and write a proper commit message.

Also, note the FIXME. I didn't want to change implementation code yet, but I think maybe the endpoint should be a member on the `Client` struct.