'Create netcat tester
If there already exists a netcat tester that has established
connection, exception is raised.'

def _create_nc_tester(self, direction, protocol, src_port, dst_port):

    nc_key = (direction, protocol, src_port, dst_port)
    nc_tester = self._nc_testers.get(nc_key)
    if (nc_tester and nc_tester.is_established):
        raise ConnectionTesterException(('%s    connection    using    %s    protocol,    source    port    %s    and    destination    port    %s    is    already    established' % (direction, protocol, src_port, dst_port)))
    if (direction == self.INGRESS):
        client_ns = self.peer_namespace
        server_ns = self.vm_namespace
        server_addr = self.vm_ip_address
    else:
        client_ns = self.vm_namespace
        server_ns = self.peer_namespace
        server_addr = self.peer_ip_address
    server_port = (dst_port or net_helpers.get_free_namespace_port(protocol, server_ns))
    nc_tester = net_helpers.NetcatTester(client_namespace=client_ns, server_namespace=server_ns, address=server_addr, protocol=protocol, src_port=src_port, dst_port=server_port)
    self._nc_testers[nc_key] = nc_tester
    return nc_tester
