Added test case and func for connection failure
added and tested send() method