Query server

Similarly factor this out as a shared `_test_sample(Server, args)`