def METHOD_NAME(event_manager, element_factory, diagrams):
    """Test connect/disconnect on comment and actor using comment-line."""
    diagram = element_factory.create(Diagram)
    event_manager.handle(DiagramOpened(diagram))
    comment = diagram.create(CommentItem, subject=element_factory.create(Comment))
    line = diagram.create(CommentLineItem)
    view = current_diagram_view(diagrams)
    assert view, "View should be available here"
    handle = line.handles()[0]
    move = HandleMove(line, handle, view)
    handle.pos = (0, 0)
    sink = move.glue(handle.pos)
    assert sink is not None
    assert sink.item is comment
    move.connect(handle.pos)
    cinfo = diagram.connections.get_connection(handle)
    assert cinfo is not None, None
    assert cinfo.item is line
    assert cinfo.connected is comment
    # Connect the other end to the Actor:
    actor = diagram.create(ActorItem, subject=element_factory.create(UML.Actor))
    handle = line.handles()[-1]
    move = HandleMove(line, handle, view)
    handle.pos = (0, 0)
    sink = move.glue(handle.pos)
    assert sink, f"No sink at {handle.pos}"
    assert sink.item is actor
    move.connect(handle.pos)
    cinfo = view.model.connections.get_connection(handle)
    assert cinfo.item is line
    assert cinfo.connected is actor
    # Try to connect far away from any item will only do a full disconnect
    assert len(comment.subject.annotatedElement) == 1, comment.subject.annotatedElement
    assert actor.subject in comment.subject.annotatedElement
    sink = move.glue((500, 500))
    assert sink is None, sink
    move.connect((500, 500))
    cinfo = view.model.connections.get_connection(handle)
    assert cinfo is None