Fix test warnings about unnecessary allocations.
Add a client test.