mock socket
mock methods