Add unit tests for the Tor client endpoint