Define and test Socket component.