wrote all tests for Socket