Add tests for Socket