pkg/client: refactor tests

supersede #13