Refactor client test to deserialize json into test objects.

This avoids duplication between the test setup and the objects being asserted upon.
Add Lists method to client.