Add unit test for the socket service and fix some associated issues