test: Introduce a helper object for various test clients.

Extracted (with modifications) from #501