Adding tests for socket code