def METHOD_NAME(devices, project, controller):
    link = Link(devices[0], devices[0].ports()[0], devices[1], devices[1].ports()[0])
    data = {
        "suspend": False,
        "nodes": [
            {"node_id": devices[0].node_id(), "adapter_number": 0, "port_number": 0},
            {"node_id": devices[1].node_id(), "adapter_number": 0, "port_number": 0},
        ],
        "link_style": {},
        "filters": {},
    }
    controller.post.assert_called_with("/projects/{}/links".format(project.id()), link._linkCreatedCallback, body=data)
    mock_signal = MagicMock()
    link.add_link_signal.connect(mock_signal)
    link._linkCreatedCallback({"link_id": str(uuid.uuid4())})
    mock_signal.assert_called_with(link._id)
    assert link._link_id is not None
    assert not devices[0].ports()[0].isFree()
    assert link.getNodePort(devices[0]) == devices[0].ports()[0]
    assert link.getNodePort(devices[1]) == devices[1].ports()[0]