def METHOD_NAME(case, create):
    """Test if stereotype is removed when extension is deleted."""
    c = create(ComponentItem, UML.Component)
    c.show_stereotypes = True
    instance_spec = UML.recipes.apply_stereotype(c.subject, case.st1)
    slot = UML.recipes.add_slot(instance_spec, case.st1.ownedAttribute[0])
    slot.value = "foo"
    # test precondition
    assert len(compartments(c)) == 1
    assert len(c.subject.appliedStereotype) == 1
    case.ext1.unlink()
    assert len(c.subject.appliedStereotype) == 0
    assert len(compartments(c)) == 0