Add more tests for client registration code in test.cpp.