def METHOD_NAME(create, diagram):
    """Test comment line unlinking using a class item."""
    clazz = create(ClassItem, UML.Class)
    comment = create(CommentItem, Comment)
    line = create(CommentLineItem)
    connect(line, line.head, comment)
    connect(line, line.tail, clazz)
    assert clazz.subject in comment.subject.annotatedElement
    assert comment.subject in clazz.subject.comment
    assert line.diagram
    clazz_subject = clazz.subject
    clazz.unlink()
    assert clazz not in diagram.ownedPresentation
    assert not clazz.diagram
    assert line not in diagram.ownedPresentation
    assert not line.diagram
    assert not comment.subject.annotatedElement
    assert len(clazz_subject.comment) == 0