'Verify that close() disconnects the connector and errors callbacks.'

@patch('twisted.internet.reactor.connectTCP')
def test_close(self, mock_connectTCP):

    self.obj_ut.error_all_requests = Mock()
    self.obj_ut.add_connection()
    self.obj_ut.is_closed = False
    self.obj_ut.close()
    self.obj_ut.connector.disconnect.assert_called_with()
    self.assertTrue(self.obj_ut.connected_event.is_set())
    self.assertTrue(self.obj_ut.error_all_requests.called)
