def METHOD_NAME(diagram, element_factory, cls_type, item):
    cls = element_factory.create(cls_type)
    attr = element_factory.create(UML.Property)
    parse(attr, "- attr: str")
    cls.ownedAttribute = attr
    cls_item = diagram.create(item, subject=cls)
    new_items = copy_clear_and_paste_link({cls_item}, diagram, element_factory)
    new_cls_item = new_items.pop()
    assert isinstance(new_cls_item, item)
    assert format(new_cls_item.subject.ownedAttribute[0]) == "- attr: str"