def METHOD_NAME(self):
    assert_equal(self.nodes[0].getaddednodeinfo(), [])
    # add a node (node2) to node0
    ip_port = "127.0.0.1:{}".format(p2p_port(2))
    self.nodes[0].addnode(ip_port, 'add')
    # check that the node has indeed been added
    added_nodes = self.nodes[0].getaddednodeinfo(ip_port)
    assert_equal(len(added_nodes), 1)
    assert_equal(added_nodes[0]['addednode'], ip_port)
    # check that a non-existent node returns an error
    assert_raises_rpc_error(-24, "Node has not been added", self.nodes[0].getaddednodeinfo, '1.1.1.1')