Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.di2
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.notation53
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.profile.di2
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.profile.notation294
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.profile.uml310
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.uml48
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/AllTests.java2
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/DuplicateStereotypeCommandTest.java177
8 files changed, 888 insertions, 0 deletions
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.di b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.di
new file mode 100644
index 00000000000..bf9abab340f
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.notation b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.notation
new file mode 100644
index 00000000000..a99c1fd04f3
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.notation
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_LgNjAJnQEea7EO1JCZQceQ" type="PapyrusUMLClassDiagram" name="ClassDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_3lEoMP_NEemiA_5PHt3jZQ" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_3lF2UP_NEemiA_5PHt3jZQ" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_3lF2Uf_NEemiA_5PHt3jZQ" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_3lF2Uv_NEemiA_5PHt3jZQ" y="15"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_3lF2U__NEemiA_5PHt3jZQ" type="Class_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_3lF2VP_NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_3lF2Vf_NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_3lF2Vv_NEemiA_5PHt3jZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3lF2V__NEemiA_5PHt3jZQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_3lF2WP_NEemiA_5PHt3jZQ" type="Class_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_3lF2Wf_NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_3lF2Wv_NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_3lF2W__NEemiA_5PHt3jZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3lF2XP_NEemiA_5PHt3jZQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_3lF2Xf_NEemiA_5PHt3jZQ" type="Class_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_3lF2Xv_NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_3lF2X__NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_3lF2YP_NEemiA_5PHt3jZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3lF2Yf_NEemiA_5PHt3jZQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_WbJ4gJnOEea7EO1JCZQceQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3lEoMf_NEemiA_5PHt3jZQ" x="184" y="258"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_3lsTQ__NEemiA_5PHt3jZQ" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_3lsTRP_NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_3lsTRv_NEemiA_5PHt3jZQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="model.uml#_WbJ4gJnOEea7EO1JCZQceQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3lsTRf_NEemiA_5PHt3jZQ" x="200"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_LgNjAZnQEea7EO1JCZQceQ" name="diagram_compatibility_version" stringValue="1.4.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_LgNjApnQEea7EO1JCZQceQ"/>
+ <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_lhmlYPb-EemXPL2vEpU9Iw" diagramKindId="org.eclipse.papyrus.uml.diagram.class">
+ <owner xmi:type="uml:Model" href="model.uml#_KmXb0JnOEea7EO1JCZQceQ"/>
+ </styles>
+ <element xmi:type="uml:Model" href="model.uml#_KmXb0JnOEea7EO1JCZQceQ"/>
+ <edges xmi:type="notation:Connector" xmi:id="_3lsTR__NEemiA_5PHt3jZQ" type="StereotypeCommentLink" source="_3lEoMP_NEemiA_5PHt3jZQ" target="_3lsTQ__NEemiA_5PHt3jZQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_3lsTSP_NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_3lsTTP_NEemiA_5PHt3jZQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="model.uml#_WbJ4gJnOEea7EO1JCZQceQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_3lsTSf_NEemiA_5PHt3jZQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_3lsTSv_NEemiA_5PHt3jZQ"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_3lsTS__NEemiA_5PHt3jZQ"/>
+ </edges>
+</notation:Diagram>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.profile.di b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.profile.di
new file mode 100644
index 00000000000..247ed5e3570
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.profile.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.uml.architecture.Profile"/>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.profile.notation b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.profile.notation
new file mode 100644
index 00000000000..2179392a025
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.profile.notation
@@ -0,0 +1,294 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_bJIVsPb-EemXPL2vEpU9Iw" type="PapyrusUMLProfileDiagram" name="NewProfileDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_b-bmAPb-EemXPL2vEpU9Iw" type="Stereotype_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_b-cNEPb-EemXPL2vEpU9Iw" type="Stereotype_NameLabel"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_b-cNEfb-EemXPL2vEpU9Iw" type="Stereotype_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_b-cNEvb-EemXPL2vEpU9Iw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_b-cNE_b-EemXPL2vEpU9Iw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_b-cNFPb-EemXPL2vEpU9Iw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_b-cNFfb-EemXPL2vEpU9Iw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_b-cNFvb-EemXPL2vEpU9Iw" type="Stereotype_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_b-cNF_b-EemXPL2vEpU9Iw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_b-cNGPb-EemXPL2vEpU9Iw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_b-cNGfb-EemXPL2vEpU9Iw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_b-cNGvb-EemXPL2vEpU9Iw"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="model.profile.uml#_SXjDsJnPEea7EO1JCZQceQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_b-bmAfb-EemXPL2vEpU9Iw" x="180" y="280"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_b-vIAPb-EemXPL2vEpU9Iw" type="Class_MetaclassShape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_b-vIAvb-EemXPL2vEpU9Iw" type="Class_MetaclassNameLabel"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_b-vIAfb-EemXPL2vEpU9Iw" x="400" y="80"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_fd8Z0Pb-EemXPL2vEpU9Iw" type="Class_MetaclassShape">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fd9n8Pb-EemXPL2vEpU9Iw" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fd9n8fb-EemXPL2vEpU9Iw" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fd9n8vb-EemXPL2vEpU9Iw" key="StereotypeList" value="StandardProfile::Metaclass"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fd9n8_b-EemXPL2vEpU9Iw" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fd9n9Pb-EemXPL2vEpU9Iw" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fd9n9fb-EemXPL2vEpU9Iw" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_fd8Z0vb-EemXPL2vEpU9Iw" type="Class_MetaclassNameLabel"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fd9A4Pb-EemXPL2vEpU9Iw" x="400" y="480"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_OQrS8P8JEem5t_XNLaKGEg" type="DataType_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_OQtvMP8JEem5t_XNLaKGEg" type="DataType_NameLabel"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_OQuWQP8JEem5t_XNLaKGEg" type="DataType_AttributeCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_TDLYoP8JEem5t_XNLaKGEg" type="Property_DataTypeAttributeLabel">
+ <element xmi:type="uml:Property" href="model.profile.uml#_TCsQcP8JEem5t_XNLaKGEg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TDLYof8JEem5t_XNLaKGEg"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_OQuWQf8JEem5t_XNLaKGEg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_OQuWQv8JEem5t_XNLaKGEg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_OQuWQ_8JEem5t_XNLaKGEg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OQuWRP8JEem5t_XNLaKGEg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_OQuWRf8JEem5t_XNLaKGEg" type="DataType_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_OQuWRv8JEem5t_XNLaKGEg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_OQuWR_8JEem5t_XNLaKGEg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_OQuWSP8JEem5t_XNLaKGEg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OQuWSf8JEem5t_XNLaKGEg"/>
+ </children>
+ <element xmi:type="uml:DataType" href="model.profile.uml#_OPsbgP8JEem5t_XNLaKGEg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OQrS8f8JEem5t_XNLaKGEg" x="600" y="480"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Klid4P_NEemiA_5PHt3jZQ" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Klid4f_NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_KljE8P_NEemiA_5PHt3jZQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Klid4v_NEemiA_5PHt3jZQ" x="380" y="80"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Kl5DMP_NEemiA_5PHt3jZQ" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Kl5DMf_NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_Kl5DM__NEemiA_5PHt3jZQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Kl5DMv_NEemiA_5PHt3jZQ" x="680" y="300"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_MPv88P_NEemiA_5PHt3jZQ" type="Stereotype_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_MPxyIP_NEemiA_5PHt3jZQ" type="Stereotype_NameLabel"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MPxyIf_NEemiA_5PHt3jZQ" type="Stereotype_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MPxyIv_NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MPxyI__NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MPxyJP_NEemiA_5PHt3jZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MPxyJf_NEemiA_5PHt3jZQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MPxyJv_NEemiA_5PHt3jZQ" type="Stereotype_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MPxyJ__NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MPxyKP_NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MPxyKf_NEemiA_5PHt3jZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MPxyKv_NEemiA_5PHt3jZQ"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="model.profile.uml#_MO3MIP_NEemiA_5PHt3jZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MPv88f_NEemiA_5PHt3jZQ" x="400" y="280"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_MoUN8P_NEemiA_5PHt3jZQ" type="Stereotype_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_MoUN8v_NEemiA_5PHt3jZQ" type="Stereotype_NameLabel"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MoUN8__NEemiA_5PHt3jZQ" type="Stereotype_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MoUN9P_NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MoUN9f_NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MoUN9v_NEemiA_5PHt3jZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MoUN9__NEemiA_5PHt3jZQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MoUN-P_NEemiA_5PHt3jZQ" type="Stereotype_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MoUN-f_NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MoUN-v_NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MoUN-__NEemiA_5PHt3jZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MoUN_P_NEemiA_5PHt3jZQ"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="model.profile.uml#_MoSYwP_NEemiA_5PHt3jZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MoUN8f_NEemiA_5PHt3jZQ" x="620" y="280"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_bJIVsfb-EemXPL2vEpU9Iw" name="diagram_compatibility_version" stringValue="1.4.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_bJIVsvb-EemXPL2vEpU9Iw"/>
+ <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_bJIVs_b-EemXPL2vEpU9Iw" diagramKindId="org.eclipse.papyrus.uml.diagram.profile">
+ <owner xmi:type="uml:Profile" href="model.profile.uml#_I22JgJnPEea7EO1JCZQceQ"/>
+ </styles>
+ <element xmi:type="uml:Profile" href="model.profile.uml#_I22JgJnPEea7EO1JCZQceQ"/>
+ <edges xmi:type="notation:Connector" xmi:id="_b_kOcPb-EemXPL2vEpU9Iw" type="Extension_Edge" source="_b-bmAPb-EemXPL2vEpU9Iw" target="_b-vIAPb-EemXPL2vEpU9Iw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_aF83wP_NEemiA_5PHt3jZQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_aF9e0P_NEemiA_5PHt3jZQ" key="routing" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:FontStyle" xmi:id="_b_kOcfb-EemXPL2vEpU9Iw"/>
+ <element xmi:type="uml:Extension" href="model.profile.uml#_Tb6qwJnPEea7EO1JCZQceQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_b_kOcvb-EemXPL2vEpU9Iw"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dAancPb-EemXPL2vEpU9Iw" id="(0.4,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dAancfb-EemXPL2vEpU9Iw" id="(0.2,1.0)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_gNKQQPb-EemXPL2vEpU9Iw" type="Association_Edge" source="_b-bmAPb-EemXPL2vEpU9Iw" target="_fd8Z0Pb-EemXPL2vEpU9Iw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_aF-F4P_NEemiA_5PHt3jZQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_aF-F4f_NEemiA_5PHt3jZQ" key="routing" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_gNK3UPb-EemXPL2vEpU9Iw" type="Association_StereotypeLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_YFuFYP_NEemiA_5PHt3jZQ" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_gNK3Ufb-EemXPL2vEpU9Iw" y="60"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_gNK3Uvb-EemXPL2vEpU9Iw" type="Association_NameLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_YGHuAP_NEemiA_5PHt3jZQ" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_gNK3U_b-EemXPL2vEpU9Iw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_gNK3VPb-EemXPL2vEpU9Iw" type="Association_TargetRoleLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_YGhWoP_NEemiA_5PHt3jZQ" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_gNK3Vfb-EemXPL2vEpU9Iw" x="-69" y="54"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_gNK3Vvb-EemXPL2vEpU9Iw" visible="false" type="Association_SourceRoleLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_YG_QsP_NEemiA_5PHt3jZQ" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_gNK3V_b-EemXPL2vEpU9Iw" x="30" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_gNK3WPb-EemXPL2vEpU9Iw" visible="false" type="Association_SourceMultiplicityLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_YHltoP_NEemiA_5PHt3jZQ" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_gNLeYPb-EemXPL2vEpU9Iw" x="30" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_gNLeYfb-EemXPL2vEpU9Iw" type="Association_TargetMultiplicityLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_YIDAoP_NEemiA_5PHt3jZQ" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_gNLeYvb-EemXPL2vEpU9Iw" x="-30" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_gNKQQfb-EemXPL2vEpU9Iw"/>
+ <element xmi:type="uml:Association" href="model.profile.uml#_gM1gIPb-EemXPL2vEpU9Iw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_gNKQQvb-EemXPL2vEpU9Iw"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_gN-IkPb-EemXPL2vEpU9Iw" id="(0.4,1.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_gN-Ikfb-EemXPL2vEpU9Iw" id="(0.0,0.4)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_ZhFtsP79EemFOM1aWBZzpg" type="Association_Edge" source="_MPv88P_NEemiA_5PHt3jZQ" target="_fd8Z0Pb-EemXPL2vEpU9Iw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_aF-F4v_NEemiA_5PHt3jZQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_aF-s8P_NEemiA_5PHt3jZQ" key="routing" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ZhMbYP79EemFOM1aWBZzpg" type="Association_StereotypeLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_beJQQP79EemFOM1aWBZzpg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ZhMbYf79EemFOM1aWBZzpg" y="60"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ZhNCcP79EemFOM1aWBZzpg" type="Association_NameLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_bfTG0P79EemFOM1aWBZzpg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ZhNCcf79EemFOM1aWBZzpg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ZhVlUP79EemFOM1aWBZzpg" type="Association_TargetRoleLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_bf5jwP79EemFOM1aWBZzpg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ZhWMYP79EemFOM1aWBZzpg" x="-27" y="30"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ZhWMYf79EemFOM1aWBZzpg" visible="false" type="Association_SourceRoleLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_bhhUYP79EemFOM1aWBZzpg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ZhWzcP79EemFOM1aWBZzpg" x="38" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ZhXagP79EemFOM1aWBZzpg" visible="false" type="Association_SourceMultiplicityLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_bigL0P79EemFOM1aWBZzpg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ZhYBkP79EemFOM1aWBZzpg" x="38" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ZhZ2wP79EemFOM1aWBZzpg" type="Association_TargetMultiplicityLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_bjcnAP79EemFOM1aWBZzpg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ZhZ2wf79EemFOM1aWBZzpg" x="-13" y="-5"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_ZhGUwP79EemFOM1aWBZzpg"/>
+ <element xmi:type="uml:Association" href="model.profile.uml#_ZebbQP79EemFOM1aWBZzpg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ZhGUwf79EemFOM1aWBZzpg"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ZrKPsP79EemFOM1aWBZzpg" id="(0.6,1.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ZrKPsf79EemFOM1aWBZzpg" id="(0.6,0.0)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_QkQfIP8JEem5t_XNLaKGEg" type="Association_Edge" source="_MoUN8P_NEemiA_5PHt3jZQ" target="_OQrS8P8JEem5t_XNLaKGEg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_aF-s8f_NEemiA_5PHt3jZQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_aF-s8v_NEemiA_5PHt3jZQ" key="routing" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_QkRGMP8JEem5t_XNLaKGEg" type="Association_StereotypeLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_RCf6UP8JEem5t_XNLaKGEg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_QkRGMf8JEem5t_XNLaKGEg" y="60"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_QkRGMv8JEem5t_XNLaKGEg" type="Association_NameLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_RCzcUP8JEem5t_XNLaKGEg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_QkRGM_8JEem5t_XNLaKGEg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_QkRtQP8JEem5t_XNLaKGEg" type="Association_TargetRoleLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_RDG-UP8JEem5t_XNLaKGEg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_QkRtQf8JEem5t_XNLaKGEg" x="-33" y="-104"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_QkRtQv8JEem5t_XNLaKGEg" visible="false" type="Association_SourceRoleLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_RDagUP8JEem5t_XNLaKGEg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_QkRtQ_8JEem5t_XNLaKGEg" x="60" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_QkRtRP8JEem5t_XNLaKGEg" visible="false" type="Association_SourceMultiplicityLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_RD7dsP8JEem5t_XNLaKGEg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_QkRtRf8JEem5t_XNLaKGEg" x="60" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_QkRtRv8JEem5t_XNLaKGEg" type="Association_TargetMultiplicityLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_RETRIP8JEem5t_XNLaKGEg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_QkRtR_8JEem5t_XNLaKGEg" x="-13" y="-33"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_QkQfIf8JEem5t_XNLaKGEg"/>
+ <element xmi:type="uml:Association" href="model.profile.uml#_QjrQUP8JEem5t_XNLaKGEg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_QkQfIv8JEem5t_XNLaKGEg"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_QlM6UP8JEem5t_XNLaKGEg" id="(0.6,1.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_QlM6Uf8JEem5t_XNLaKGEg" id="(0.5633802816901409,0.0)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_aPAGIP8JEem5t_XNLaKGEg" type="Association_Edge" source="_OQrS8P8JEem5t_XNLaKGEg" target="_fd8Z0Pb-EemXPL2vEpU9Iw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_aF_UAP_NEemiA_5PHt3jZQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_aF_UAf_NEemiA_5PHt3jZQ" key="routing" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_aPAtMP8JEem5t_XNLaKGEg" type="Association_StereotypeLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_QFaKgP8KEem5t_XNLaKGEg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_aPAtMf8JEem5t_XNLaKGEg" y="60"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_aPAtMv8JEem5t_XNLaKGEg" type="Association_NameLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_QFu6oP8KEem5t_XNLaKGEg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_aPAtM_8JEem5t_XNLaKGEg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_aPBUQP8JEem5t_XNLaKGEg" type="Association_TargetRoleLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_QF9kIP8KEem5t_XNLaKGEg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_aPBUQf8JEem5t_XNLaKGEg" x="-16" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_aPBUQv8JEem5t_XNLaKGEg" type="Association_SourceRoleLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_QGMNoP8KEem5t_XNLaKGEg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_aPBUQ_8JEem5t_XNLaKGEg" x="17" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_aPBURP8JEem5t_XNLaKGEg" type="Association_SourceMultiplicityLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_QGehgP8KEem5t_XNLaKGEg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_aPBURf8JEem5t_XNLaKGEg" x="17" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_aPBURv8JEem5t_XNLaKGEg" type="Association_TargetMultiplicityLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_QGyDgP8KEem5t_XNLaKGEg" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_aPBUR_8JEem5t_XNLaKGEg" x="-16" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_aPAGIf8JEem5t_XNLaKGEg"/>
+ <element xmi:type="uml:Association" href="model.profile.uml#_aOlPYP8JEem5t_XNLaKGEg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_aPAGIv8JEem5t_XNLaKGEg"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_aP_koP8JEem5t_XNLaKGEg" id="(0.0,0.2)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_aP_kof8JEem5t_XNLaKGEg" id="(1.0,0.4)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_KljsAP_NEemiA_5PHt3jZQ" type="StereotypeCommentLink" source="_b-vIAPb-EemXPL2vEpU9Iw" target="_Klid4P_NEemiA_5PHt3jZQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_KljsAf_NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_KlkTEf_NEemiA_5PHt3jZQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KljsAv_NEemiA_5PHt3jZQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_KljsA__NEemiA_5PHt3jZQ"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_KlkTEP_NEemiA_5PHt3jZQ"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_Kl5DNP_NEemiA_5PHt3jZQ" type="StereotypeCommentLink" source="_fd8Z0Pb-EemXPL2vEpU9Iw" target="_Kl5DMP_NEemiA_5PHt3jZQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_Kl5DNf_NEemiA_5PHt3jZQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_Kl5qQP_NEemiA_5PHt3jZQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Kl5DNv_NEemiA_5PHt3jZQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Kl5DN__NEemiA_5PHt3jZQ"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Kl5DOP_NEemiA_5PHt3jZQ"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_xaPdoP_NEemiA_5PHt3jZQ" type="Extension_Edge" source="_MPv88P_NEemiA_5PHt3jZQ" target="_b-vIAPb-EemXPL2vEpU9Iw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_xaPdof_NEemiA_5PHt3jZQ"/>
+ <element xmi:type="uml:Extension" href="model.profile.uml#_xZyxsP_NEemiA_5PHt3jZQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_xaPdov_NEemiA_5PHt3jZQ" points="[460, 280, -643984, -643984]$[240, 130, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_xa494P_NEemiA_5PHt3jZQ" id="(0.6,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_xa5k8P_NEemiA_5PHt3jZQ" id="(0.6,1.0)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_x9xogP_NEemiA_5PHt3jZQ" type="Extension_Edge" source="_MoUN8P_NEemiA_5PHt3jZQ" target="_b-vIAPb-EemXPL2vEpU9Iw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_x9xogf_NEemiA_5PHt3jZQ"/>
+ <element xmi:type="uml:Extension" href="model.profile.uml#_x9acIP_NEemiA_5PHt3jZQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_x9xogv_NEemiA_5PHt3jZQ" points="[660, 280, -643984, -643984]$[260, 130, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_x-QwsP_NEemiA_5PHt3jZQ" id="(0.4,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_x-RXwP_NEemiA_5PHt3jZQ" id="(0.8,1.0)"/>
+ </edges>
+</notation:Diagram>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.profile.uml b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.profile.uml
new file mode 100644
index 00000000000..742eb28de37
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.profile.uml
@@ -0,0 +1,310 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Profile xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_I22JgJnPEea7EO1JCZQceQ" name="ProfileTest" metaclassReference="_QuiegJnPEea7EO1JCZQceQ _fd59kPb-EemXPL2vEpU9Iw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Uzqg0JnPEea7EO1JCZQceQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fdvlgPb-EemXPL2vEpU9Iw" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fdwMkPb-EemXPL2vEpU9Iw" key="Version" value="0.0.0"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fdwMkfb-EemXPL2vEpU9Iw" key="Comment" value="&lt;undefined>"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fdwMkvb-EemXPL2vEpU9Iw" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fdwMk_b-EemXPL2vEpU9Iw" key="Date" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fdwMlPb-EemXPL2vEpU9Iw" key="Author" value="&lt;undefined>"/>
+ </eAnnotations>
+ <contents xmi:type="ecore:EPackage" xmi:id="_07TwoP_NEemiA_5PHt3jZQ" name="ProfileTest" nsURI="http:///schemas/ProfileTest/_07QtUP_NEemiA_5PHt3jZQ/8" nsPrefix="ProfileTest">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_07ZQMv_NEemiA_5PHt3jZQ" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_07ZQM__NEemiA_5PHt3jZQ" key="Version" value="0.0.9"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_07ZQNP_NEemiA_5PHt3jZQ" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_07ZQNf_NEemiA_5PHt3jZQ" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_07ZQNv_NEemiA_5PHt3jZQ" key="Date" value="2019-11-05"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_07ZQN__NEemiA_5PHt3jZQ" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_07Twof_NEemiA_5PHt3jZQ" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_07Twov_NEemiA_5PHt3jZQ" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_SXjDsJnPEea7EO1JCZQceQ"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_07Two__NEemiA_5PHt3jZQ" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_07Twpf_NEemiA_5PHt3jZQ" name="singleMultiplicityProp" ordered="false" lowerBound="1" containment="true">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_07Twp__NEemiA_5PHt3jZQ" name="DataType1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_07TwqP_NEemiA_5PHt3jZQ" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_OPsbgP8JEem5t_XNLaKGEg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_07Twqf_NEemiA_5PHt3jZQ" name="dt_p1" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_07Twq__NEemiA_5PHt3jZQ" name="dt_p2" ordered="false" lowerBound="1" containment="true">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_07Twrf_NEemiA_5PHt3jZQ" name="Stereotype2">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_07Twrv_NEemiA_5PHt3jZQ" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_MO3MIP_NEemiA_5PHt3jZQ"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_07Twr__NEemiA_5PHt3jZQ" name="multivaluedProp" ordered="false" upperBound="-1" containment="true">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_07Twsf_NEemiA_5PHt3jZQ" name="base_Class" ordered="false">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_07Tws__NEemiA_5PHt3jZQ" name="Stereotype3">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_07TwtP_NEemiA_5PHt3jZQ" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_MoSYwP_NEemiA_5PHt3jZQ"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_07Twtf_NEemiA_5PHt3jZQ" name="MultivaluedDataTypeProp" ordered="false" lowerBound="1" upperBound="-1" eType="_07Twp__NEemiA_5PHt3jZQ" containment="true"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_07Twt__NEemiA_5PHt3jZQ" name="base_Class" ordered="false">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_1QzDEP8KEem5t_XNLaKGEg" name="ProfileTest" nsURI="http:///schemas/ProfileTest/_1QycAP8KEem5t_XNLaKGEg/7" nsPrefix="ProfileTest">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1Q04RP8KEem5t_XNLaKGEg" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1Q04Rf8KEem5t_XNLaKGEg" key="Version" value="0.0.8"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1Q04Rv8KEem5t_XNLaKGEg" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1Q04R_8KEem5t_XNLaKGEg" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1Q04SP8KEem5t_XNLaKGEg" key="Date" value="2019-11-04"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1Q04Sf8KEem5t_XNLaKGEg" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_1QzDEf8KEem5t_XNLaKGEg" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1QzDEv8KEem5t_XNLaKGEg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_SXjDsJnPEea7EO1JCZQceQ"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_1QzDE_8KEem5t_XNLaKGEg" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_1QzDFf8KEem5t_XNLaKGEg" name="p1" ordered="false" lowerBound="1" containment="true">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_1QzDF_8KEem5t_XNLaKGEg" name="p2" ordered="false" upperBound="-1" containment="true">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_1QzDGf8KEem5t_XNLaKGEg" name="p3" ordered="false" lowerBound="1" upperBound="-1" eType="_1QzDG_8KEem5t_XNLaKGEg" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_1QzDG_8KEem5t_XNLaKGEg" name="DataType1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1QzDHP8KEem5t_XNLaKGEg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_OPsbgP8JEem5t_XNLaKGEg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_1QzDHf8KEem5t_XNLaKGEg" name="dt_p1" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_1QzDH_8KEem5t_XNLaKGEg" name="dt_p2" ordered="false" lowerBound="1" containment="true">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_RpB5Yf8KEem5t_XNLaKGEg" name="ProfileTest" nsURI="http:///schemas/ProfileTest/_RpB5YP8KEem5t_XNLaKGEg/6" nsPrefix="ProfileTest">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_RpSYEP8KEem5t_XNLaKGEg" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RpSYEf8KEem5t_XNLaKGEg" key="Version" value="0.0.7"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RpSYEv8KEem5t_XNLaKGEg" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RpSYE_8KEem5t_XNLaKGEg" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RpSYFP8KEem5t_XNLaKGEg" key="Date" value="2019-11-04"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RpSYFf8KEem5t_XNLaKGEg" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_RpB5Yv8KEem5t_XNLaKGEg" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_RpB5Y_8KEem5t_XNLaKGEg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_SXjDsJnPEea7EO1JCZQceQ"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_RpB5ZP8KEem5t_XNLaKGEg" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_RpB5Zv8KEem5t_XNLaKGEg" name="p1" ordered="false" lowerBound="1" containment="true">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_RpB5aP8KEem5t_XNLaKGEg" name="p2" ordered="false" upperBound="-1" containment="true">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_RpB5av8KEem5t_XNLaKGEg" name="p3" ordered="false" lowerBound="1" eType="_RpB5bP8KEem5t_XNLaKGEg" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_RpB5bP8KEem5t_XNLaKGEg" name="DataType1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_RpB5bf8KEem5t_XNLaKGEg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_OPsbgP8JEem5t_XNLaKGEg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_RpB5bv8KEem5t_XNLaKGEg" name="dt_p1" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_RpB5cP8KEem5t_XNLaKGEg" name="dt_p2" ordered="false" lowerBound="1" containment="true">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_eGIvwP8JEem5t_XNLaKGEg" name="ProfileTest" nsURI="http:///schemas/ProfileTest/_eGFscP8JEem5t_XNLaKGEg/5" nsPrefix="ProfileTest">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_eGKk8v8JEem5t_XNLaKGEg" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_eGKk8_8JEem5t_XNLaKGEg" key="Version" value="0.0.6"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_eGKk9P8JEem5t_XNLaKGEg" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_eGKk9f8JEem5t_XNLaKGEg" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_eGKk9v8JEem5t_XNLaKGEg" key="Date" value="2019-11-04"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_eGKk9_8JEem5t_XNLaKGEg" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_eGIvwf8JEem5t_XNLaKGEg" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_eGIvwv8JEem5t_XNLaKGEg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_SXjDsJnPEea7EO1JCZQceQ"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_eGIvw_8JEem5t_XNLaKGEg" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_eGIvxf8JEem5t_XNLaKGEg" name="p1" ordered="false" lowerBound="1" containment="true">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_eGIvx_8JEem5t_XNLaKGEg" name="p2" ordered="false" upperBound="-1" containment="true">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_eGIvyf8JEem5t_XNLaKGEg" name="datatype1" ordered="false" lowerBound="1" eType="_eGIvy_8JEem5t_XNLaKGEg" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_eGIvy_8JEem5t_XNLaKGEg" name="DataType1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_eGIvzP8JEem5t_XNLaKGEg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_OPsbgP8JEem5t_XNLaKGEg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_eGIvzf8JEem5t_XNLaKGEg" name="dt_p1" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_eGIvz_8JEem5t_XNLaKGEg" name="datatype1" ordered="false" lowerBound="1" containment="true">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_s3N04P79EemFOM1aWBZzpg" name="ProfileTest" nsURI="http:///schemas/ProfileTest/_s3I8YP79EemFOM1aWBZzpg/4" nsPrefix="ProfileTest">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_s3SGUP79EemFOM1aWBZzpg" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_s3SGUf79EemFOM1aWBZzpg" key="Version" value="0.0.5"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_s3SGUv79EemFOM1aWBZzpg" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_s3SGU_79EemFOM1aWBZzpg" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_s3SGVP79EemFOM1aWBZzpg" key="Date" value="2019-11-04"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_s3SGVf79EemFOM1aWBZzpg" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_s3N04f79EemFOM1aWBZzpg" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_s3N04v79EemFOM1aWBZzpg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_SXjDsJnPEea7EO1JCZQceQ"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_s3N04_79EemFOM1aWBZzpg" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_s3N05f79EemFOM1aWBZzpg" name="p1" ordered="false" lowerBound="1" containment="true">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_s3N05_79EemFOM1aWBZzpg" name="p2" ordered="false" upperBound="-1" containment="true">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_AIh5UPcCEemXPL2vEpU9Iw" name="ProfileTest" nsURI="http:///schemas/ProfileTest/_AIhSQPcCEemXPL2vEpU9Iw/3" nsPrefix="ProfileTest">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AIjugvcCEemXPL2vEpU9Iw" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AIjug_cCEemXPL2vEpU9Iw" key="Version" value="0.0.4"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AIjuhPcCEemXPL2vEpU9Iw" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AIjuhfcCEemXPL2vEpU9Iw" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AIjuhvcCEemXPL2vEpU9Iw" key="Date" value="2019-10-25"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AIjuh_cCEemXPL2vEpU9Iw" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_AIh5UfcCEemXPL2vEpU9Iw" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AIh5UvcCEemXPL2vEpU9Iw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_SXjDsJnPEea7EO1JCZQceQ"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AIh5U_cCEemXPL2vEpU9Iw" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AIh5VfcCEemXPL2vEpU9Iw" name="p1" ordered="false" lowerBound="1" containment="true">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_kzVKIPb-EemXPL2vEpU9Iw" name="ProfileTest" nsURI="http:///schemas/ProfileTest/_kzSt4Pb-EemXPL2vEpU9Iw/2" nsPrefix="ProfileTest">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_kzapsPb-EemXPL2vEpU9Iw" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kzapsfb-EemXPL2vEpU9Iw" key="Version" value="0.0.3"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kzapsvb-EemXPL2vEpU9Iw" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kzaps_b-EemXPL2vEpU9Iw" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kzaptPb-EemXPL2vEpU9Iw" key="Date" value="2019-10-25"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kzaptfb-EemXPL2vEpU9Iw" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_kzVKIfb-EemXPL2vEpU9Iw" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_kzVKIvb-EemXPL2vEpU9Iw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_SXjDsJnPEea7EO1JCZQceQ"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_kzVKI_b-EemXPL2vEpU9Iw" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_kzVKJfb-EemXPL2vEpU9Iw" name="property" ordered="false" lowerBound="1" containment="true">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_XrxWYJnPEea7EO1JCZQceQ" name="ProfileTest" nsURI="http:///schemas/ProfileTest/_XrwvUJnPEea7EO1JCZQceQ/1" nsPrefix="ProfileTest">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Xrx9cJnPEea7EO1JCZQceQ" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Xrx9cZnPEea7EO1JCZQceQ" key="Version" value="0.0.2"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Xrx9cpnPEea7EO1JCZQceQ" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Xrx9c5nPEea7EO1JCZQceQ" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Xrx9dJnPEea7EO1JCZQceQ" key="Date" value="2016-10-24"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Xrx9dZnPEea7EO1JCZQceQ" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_XrxWYZnPEea7EO1JCZQceQ" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_XrxWYpnPEea7EO1JCZQceQ" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_SXjDsJnPEea7EO1JCZQceQ"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_XrxWY5nPEea7EO1JCZQceQ" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_UzrH4JnPEea7EO1JCZQceQ" name="RootElement" nsURI="http:///schemas/RootElement/_UzpSsJnPEea7EO1JCZQceQ/0" nsPrefix="RootElement">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_UzwncJnPEea7EO1JCZQceQ" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UzwncZnPEea7EO1JCZQceQ" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UzwncpnPEea7EO1JCZQceQ" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Uzwnc5nPEea7EO1JCZQceQ" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UzwndJnPEea7EO1JCZQceQ" key="Date" value="2016-10-24"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UzwndZnPEea7EO1JCZQceQ" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_UzrH4ZnPEea7EO1JCZQceQ" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_UzrH4pnPEea7EO1JCZQceQ" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_SXjDsJnPEea7EO1JCZQceQ"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_UzrH45nPEea7EO1JCZQceQ" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ </eAnnotations>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_QuiegJnPEea7EO1JCZQceQ" alias="Class">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </elementImport>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_fd59kPb-EemXPL2vEpU9Iw" alias="Property">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ </elementImport>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_SXjDsJnPEea7EO1JCZQceQ" name="Stereotype1">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_Tb9HAJnPEea7EO1JCZQceQ" name="base_Class" association="_Tb6qwJnPEea7EO1JCZQceQ">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_gM5KgPb-EemXPL2vEpU9Iw" name="singleMultiplicityProp" aggregation="composite" association="_gM1gIPb-EemXPL2vEpU9Iw">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_Tb6qwJnPEea7EO1JCZQceQ" name="E_Stereotype1_Class1" memberEnd="_Tb8f8JnPEea7EO1JCZQceQ _Tb9HAJnPEea7EO1JCZQceQ">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_Tb8f8JnPEea7EO1JCZQceQ" name="extension_Stereotype1" type="_SXjDsJnPEea7EO1JCZQceQ" aggregation="composite" association="_Tb6qwJnPEea7EO1JCZQceQ"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_gM1gIPb-EemXPL2vEpU9Iw" memberEnd="_gM5KgPb-EemXPL2vEpU9Iw _gM7mwPb-EemXPL2vEpU9Iw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_gM38YPb-EemXPL2vEpU9Iw" source="org.eclipse.papyrus">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_gM4jcPb-EemXPL2vEpU9Iw" key="nature" value="UML_Nature"/>
+ </eAnnotations>
+ <ownedEnd xmi:type="uml:Property" xmi:id="_gM7mwPb-EemXPL2vEpU9Iw" name="stereotype1" type="_SXjDsJnPEea7EO1JCZQceQ" association="_gM1gIPb-EemXPL2vEpU9Iw"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_ZebbQP79EemFOM1aWBZzpg" memberEnd="_Ze25EP79EemFOM1aWBZzpg _Ze8_sP79EemFOM1aWBZzpg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Ze1D4P79EemFOM1aWBZzpg" source="org.eclipse.papyrus">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Ze1q8P79EemFOM1aWBZzpg" key="nature" value="UML_Nature"/>
+ </eAnnotations>
+ <ownedEnd xmi:type="uml:Property" xmi:id="_Ze8_sP79EemFOM1aWBZzpg" name="stereotype2" type="_MO3MIP_NEemiA_5PHt3jZQ" association="_ZebbQP79EemFOM1aWBZzpg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:DataType" xmi:id="_OPsbgP8JEem5t_XNLaKGEg" name="DataType1">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_TCsQcP8JEem5t_XNLaKGEg" name="dt_p1" visibility="public">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_aOmdgv8JEem5t_XNLaKGEg" name="dt_p2" aggregation="composite" association="_aOlPYP8JEem5t_XNLaKGEg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_QjrQUP8JEem5t_XNLaKGEg" memberEnd="_QjvhwP8JEem5t_XNLaKGEg _Qjx-AP8JEem5t_XNLaKGEg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_QjuToP8JEem5t_XNLaKGEg" source="org.eclipse.papyrus">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Qju6sP8JEem5t_XNLaKGEg" key="nature" value="UML_Nature"/>
+ </eAnnotations>
+ <ownedEnd xmi:type="uml:Property" xmi:id="_Qjx-AP8JEem5t_XNLaKGEg" name="stereotype3" type="_MoSYwP_NEemiA_5PHt3jZQ" association="_QjrQUP8JEem5t_XNLaKGEg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_aOlPYP8JEem5t_XNLaKGEg" memberEnd="_aOmdgv8JEem5t_XNLaKGEg _aOnEkP8JEem5t_XNLaKGEg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_aOmdgP8JEem5t_XNLaKGEg" source="org.eclipse.papyrus">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_aOmdgf8JEem5t_XNLaKGEg" key="nature" value="UML_Nature"/>
+ </eAnnotations>
+ <ownedEnd xmi:type="uml:Property" xmi:id="_aOnEkP8JEem5t_XNLaKGEg" name="datatype1" type="_OPsbgP8JEem5t_XNLaKGEg" association="_aOlPYP8JEem5t_XNLaKGEg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_MO3MIP_NEemiA_5PHt3jZQ" name="Stereotype2">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_Ze25EP79EemFOM1aWBZzpg" name="multivaluedProp" aggregation="composite" association="_ZebbQP79EemFOM1aWBZzpg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_r_PrEP79EemFOM1aWBZzpg"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_r_ZcEP79EemFOM1aWBZzpg" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_xZ3DIP_NEemiA_5PHt3jZQ" name="base_Class" association="_xZyxsP_NEemiA_5PHt3jZQ">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_xZ3DIf_NEemiA_5PHt3jZQ"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_MoSYwP_NEemiA_5PHt3jZQ" name="Stereotype3">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_QjvhwP8JEem5t_XNLaKGEg" name="MultivaluedDataTypeProp" type="_OPsbgP8JEem5t_XNLaKGEg" aggregation="composite" association="_QjrQUP8JEem5t_XNLaKGEg">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_0EmVsP8KEem5t_XNLaKGEg" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_x9c4YP_NEemiA_5PHt3jZQ" name="base_Class" association="_x9acIP_NEemiA_5PHt3jZQ">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_x9c4Yf_NEemiA_5PHt3jZQ"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_xZyxsP_NEemiA_5PHt3jZQ" name="E_Stereotype2_Class13" memberEnd="_xZ2cEP_NEemiA_5PHt3jZQ _xZ3DIP_NEemiA_5PHt3jZQ">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_xZ2cEP_NEemiA_5PHt3jZQ" name="extension_Stereotype2" type="_MO3MIP_NEemiA_5PHt3jZQ" aggregation="composite" association="_xZyxsP_NEemiA_5PHt3jZQ"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_x9acIP_NEemiA_5PHt3jZQ" name="E_Stereotype3_Class14" memberEnd="_x9bqQP_NEemiA_5PHt3jZQ _x9c4YP_NEemiA_5PHt3jZQ">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_x9bqQP_NEemiA_5PHt3jZQ" name="extension_Stereotype3" type="_MoSYwP_NEemiA_5PHt3jZQ" aggregation="composite" association="_x9acIP_NEemiA_5PHt3jZQ"/>
+ </packagedElement>
+</uml:Profile>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.uml b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.uml
new file mode 100644
index 00000000000..2f21518a45f
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/duplicateStereotypeCommandTest/model.uml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ProfileTest="http:///schemas/ProfileTest/_07QtUP_NEemiA_5PHt3jZQ/8" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http:///schemas/ProfileTest/_07QtUP_NEemiA_5PHt3jZQ/8 model.profile.uml#_07TwoP_NEemiA_5PHt3jZQ">
+ <uml:Model xmi:id="_KmXb0JnOEea7EO1JCZQceQ" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_OGGSEJnOEea7EO1JCZQceQ" name="SimpleClass"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_WbJ4gJnOEea7EO1JCZQceQ" name="StereotypedClass"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_1Y0OEJnPEea7EO1JCZQceQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_24BU8P_NEemiA_5PHt3jZQ" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_24BU8f_NEemiA_5PHt3jZQ" key="Version" value="0.0.9"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_24BU8v_NEemiA_5PHt3jZQ" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_24BU8__NEemiA_5PHt3jZQ" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_24BU9P_NEemiA_5PHt3jZQ" key="Date" value="2019-11-05"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_24BU9f_NEemiA_5PHt3jZQ" key="Author" value=""/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1Y1cMJnPEea7EO1JCZQceQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="model.profile.uml#_07TwoP_NEemiA_5PHt3jZQ"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="model.profile.uml#_I22JgJnPEea7EO1JCZQceQ"/>
+ </profileApplication>
+ </uml:Model>
+ <ProfileTest:Stereotype1 xmi:id="_20jMQJnPEea7EO1JCZQceQ" base_Class="_WbJ4gJnOEea7EO1JCZQceQ">
+ <singleMultiplicityProp xmi:type="uml:Property" xmi:id="_GYq_YP_OEemiA_5PHt3jZQ" name="propOwnedByStereotype1">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </singleMultiplicityProp>
+ </ProfileTest:Stereotype1>
+ <ProfileTest:Stereotype2 xmi:id="_HfBjcP_OEemiA_5PHt3jZQ" base_Class="_WbJ4gJnOEea7EO1JCZQceQ">
+ <multivaluedProp xmi:type="uml:Property" xmi:id="_L1nwQP_OEemiA_5PHt3jZQ" name="propOwnedByStereotype2_1">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </multivaluedProp>
+ <multivaluedProp xmi:type="uml:Property" xmi:id="_MnQBgP_OEemiA_5PHt3jZQ" name="propOwnedByStereotype2_2">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </multivaluedProp>
+ <multivaluedProp xmi:type="uml:Property" xmi:id="_QtNKQP_OEemiA_5PHt3jZQ" name="propOwnedByStereotype2_3">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </multivaluedProp>
+ </ProfileTest:Stereotype2>
+ <ProfileTest:Stereotype3 xmi:id="_Hf1bwP_OEemiA_5PHt3jZQ" base_Class="_WbJ4gJnOEea7EO1JCZQceQ">
+ <MultivaluedDataTypeProp xmi:type="ProfileTest:DataType1" xmi:id="_VQE4gP_OEemiA_5PHt3jZQ" dt_p1="_OGGSEJnOEea7EO1JCZQceQ">
+ <dt_p2 xmi:type="uml:Property" xmi:id="_VQGGoP_OEemiA_5PHt3jZQ" name="propOwnedByDataType_1">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </dt_p2>
+ </MultivaluedDataTypeProp>
+ <MultivaluedDataTypeProp xmi:type="ProfileTest:DataType1" xmi:id="_X10ywP_OEemiA_5PHt3jZQ" dt_p1="_WbJ4gJnOEea7EO1JCZQceQ">
+ <dt_p2 xmi:type="uml:Property" xmi:id="_X10ywf_OEemiA_5PHt3jZQ" name="propOwnedByDataType_2">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ </dt_p2>
+ </MultivaluedDataTypeProp>
+ </ProfileTest:Stereotype3>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/AllTests.java b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/AllTests.java
index f531933b2e6..6dad90112bd 100644
--- a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/AllTests.java
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/AllTests.java
@@ -13,6 +13,7 @@
* Christian W. Damus (CEA) - bug 440108
* Christian W. Damus - bugs 458197, 468030, 485220, 502461, 508629
* Ansgar Radermacher (CEA LIST) - bug 541686 (duplicated replationships)
+ * Pauline DEVILLE (CEA LIST) - bug 552410
*****************************************************************************/
package org.eclipse.papyrus.uml.tools.tests.tests;
@@ -39,6 +40,7 @@ import org.junit.runners.Suite.SuiteClasses;
DelegatingItemLabelProviderTest.class,
UMLCopyTest.class,
UMLCopyTestME.class,
+ DuplicateStereotypeCommandTest.class
})
public class AllTests {
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/DuplicateStereotypeCommandTest.java b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/DuplicateStereotypeCommandTest.java
new file mode 100644
index 00000000000..7e7761c46da
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/DuplicateStereotypeCommandTest.java
@@ -0,0 +1,177 @@
+/*****************************************************************************
+ * Copyright (c) 2019 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Pauline DEVILLE (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.tools.tests.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.uml.tools.commands.DuplicateStereotypeCommand;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+@PluginResource("/resources/duplicateStereotypeCommandTest/model.di")
+/**
+ * This test is used to test the copy of stereotype in especially for stereotype having composite association
+ * WARNING this test tests only the DuplicateStereotypeCommand (do not duplicate the element but only the stereotype application)
+ */
+public class DuplicateStereotypeCommandTest extends AbstractPapyrusTest {
+
+ @Rule
+ public final PapyrusEditorFixture editor = new PapyrusEditorFixture();
+
+ private Class stereotypedClass;
+ private Class simpleClass;
+
+ private static final String STEREOTYPE1_NAME = "Stereotype1"; //$NON-NLS-1$
+ private static final String STEREOTYPE_SINGLE_MULTIPLICITY_PROPERTY_NAME = "singleMultiplicityProp"; //$NON-NLS-1$
+
+ private static final String STEREOTYPE2_NAME = "Stereotype2"; //$NON-NLS-1$
+ private static final String STEREOTYPE_MULTIVALUED_PROPERTY_NAME = "multivaluedProp"; //$NON-NLS-1$
+
+ private static final String STEREOTYPE3_NAME = "Stereotype3"; //$NON-NLS-1$
+ private static final String STEREOTYPE_MULTIVALUED_DATATYPE_PROPERTY_NAME = "MultivaluedDataTypeProp"; //$NON-NLS-1$
+ private static final String DATATYPE_PROPERTY_1_NAME = "dt_p1"; //$NON-NLS-1$
+ private static final String DATATYPE_PROPERTY_2_NAME = "dt_p2"; //$NON-NLS-1$
+
+ private static final String SIMPLE_CLASS_NAME = "SimpleClass"; //$NON-NLS-1$
+ private static final String STEREOTYPED_CLASS_NAME = "StereotypedClass"; //$NON-NLS-1$
+
+ /**
+ * Constructor.
+ *
+ */
+ public DuplicateStereotypeCommandTest() {
+ super();
+ }
+
+ @Before
+ public void init() {
+ Package model = editor.getModel();
+ Type type1 = model.getOwnedType(STEREOTYPED_CLASS_NAME);
+ Type type2 = model.getOwnedType(SIMPLE_CLASS_NAME);
+ assertTrue("type1 should be a Class", type1 instanceof Class); //$NON-NLS-1$
+ assertTrue("type2 should be a Class", type2 instanceof Class); //$NON-NLS-1$
+ stereotypedClass = (Class) type1;
+ simpleClass = (Class) type2;
+ }
+
+ @Test
+ public void duplicateStereotypeWithSingleContainmentFeatureTest() {
+ TransactionalEditingDomain domain = editor.getEditingDomain();
+
+ EObject originalStereotypeAplications = getStereotypeApplication(stereotypedClass, STEREOTYPE1_NAME);
+
+ EStructuralFeature propertyStructuralFeature = getStructuralFeature(originalStereotypeAplications, STEREOTYPE_SINGLE_MULTIPLICITY_PROPERTY_NAME);
+ assertNotNull("the value of singleMultiplicityProp should not be null", originalStereotypeAplications.eGet(propertyStructuralFeature)); //$NON-NLS-1$
+
+ DuplicateStereotypeCommand command = new DuplicateStereotypeCommand(domain, simpleClass, originalStereotypeAplications);
+ domain.getCommandStack().execute(command);
+
+ EObject copiedStereotypeAplications = getStereotypeApplication(simpleClass, STEREOTYPE1_NAME);
+ assertNotNull("the value of singleMultiplicityProp should not be null in the copied stereotype application", copiedStereotypeAplications.eGet(propertyStructuralFeature)); //$NON-NLS-1$
+ assertNotNull("the value of singleMultiplicityProp should not be null in the original stereotype application", originalStereotypeAplications.eGet(propertyStructuralFeature)); //$NON-NLS-1$
+ }
+
+ @Test
+ public void duplicateStereotypeWithMultivaluedContainmentFeatureTest() {
+ TransactionalEditingDomain domain = editor.getEditingDomain();
+
+ EObject originalStereotypeAplications = getStereotypeApplication(stereotypedClass, STEREOTYPE2_NAME);
+ EStructuralFeature propertyStructuralFeature = getStructuralFeature(originalStereotypeAplications, STEREOTYPE_MULTIVALUED_PROPERTY_NAME);
+ assertTrue("the value of multivaluedProp should not be null and should be of type List", originalStereotypeAplications.eGet(propertyStructuralFeature) instanceof List<?>); //$NON-NLS-1$
+
+ DuplicateStereotypeCommand command = new DuplicateStereotypeCommand(domain, simpleClass, originalStereotypeAplications);
+ domain.getCommandStack().execute(command);
+
+ EObject copiedStereotypeAplications = getStereotypeApplication(simpleClass, STEREOTYPE2_NAME);
+ assertTrue("the value of multivaluedProp should not be null and should be of type List in the copied stereotype application", copiedStereotypeAplications.eGet(propertyStructuralFeature) instanceof List<?>); //$NON-NLS-1$
+ assertEquals("the value of multivaluedProp should not be empty in the copied stereotype application", 3, ((List<?>) copiedStereotypeAplications.eGet(propertyStructuralFeature)).size()); //$NON-NLS-1$
+ assertTrue("the value of multivaluedProp should not be null and should be of type List in the original stereotype application", originalStereotypeAplications.eGet(propertyStructuralFeature) instanceof List<?>); //$NON-NLS-1$
+ assertEquals("the value of multivaluedProp should not be empty in the original stereotype application", 3, ((List<?>) originalStereotypeAplications.eGet(propertyStructuralFeature)).size()); //$NON-NLS-1$
+ }
+
+ @Test
+ @SuppressWarnings("unchecked")
+ public void duplicateStereotypeWithMultivaluedDataTypeContainmentFeatureTest() {
+ TransactionalEditingDomain domain = editor.getEditingDomain();
+
+ EObject originalStereotypeAplications = getStereotypeApplication(stereotypedClass, STEREOTYPE3_NAME);
+ EStructuralFeature propertyStructuralFeature = getStructuralFeature(originalStereotypeAplications, STEREOTYPE_MULTIVALUED_DATATYPE_PROPERTY_NAME);
+ assertTrue("the value of MultivaluedDataTypeProp should not be null and should be of type List", originalStereotypeAplications.eGet(propertyStructuralFeature) instanceof List<?>); //$NON-NLS-1$
+
+ DuplicateStereotypeCommand command = new DuplicateStereotypeCommand(domain, simpleClass, originalStereotypeAplications);
+ domain.getCommandStack().execute(command);
+
+ EObject copiedStereotypeAplications = getStereotypeApplication(simpleClass, STEREOTYPE3_NAME);
+ assertTrue("the value of MultivaluedDataTypeProp should not be null and should be of type List in the copied stereotype application", copiedStereotypeAplications.eGet(propertyStructuralFeature) instanceof List<?>); //$NON-NLS-1$
+ List<EObject> copiedStereotypeApplicationP3Value = (List<EObject>) copiedStereotypeAplications.eGet(propertyStructuralFeature);
+ assertEquals("the value of MultivaluedDataTypeProp should not be empty in the copied stereotype application", 2, copiedStereotypeApplicationP3Value.size()); //$NON-NLS-1$
+ assertTrue("the value of MultivaluedDataTypeProp should not be null and should be of type List in the original stereotype application", originalStereotypeAplications.eGet(propertyStructuralFeature) instanceof List<?>); //$NON-NLS-1$
+ List<EObject> originalStereotypeApplicationP3Value = (List<EObject>) originalStereotypeAplications.eGet(propertyStructuralFeature);
+ assertEquals("the value of MultivaluedDataTypeProp should not be empty in the original stereotype application", 2, originalStereotypeApplicationP3Value.size()); //$NON-NLS-1$
+
+ // Test DataType copy
+ EStructuralFeature dataTypeProperty1 = getStructuralFeature(copiedStereotypeApplicationP3Value.get(0), DATATYPE_PROPERTY_1_NAME);
+ EStructuralFeature dataTypeProperty2 = getStructuralFeature(copiedStereotypeApplicationP3Value.get(0), DATATYPE_PROPERTY_2_NAME);
+ assertTrue("the copied data type should have a non null dt_p1 value of type Class", copiedStereotypeApplicationP3Value.get(0).eGet(dataTypeProperty1) instanceof Class); //$NON-NLS-1$
+ assertTrue("the copied data type should have a non null dt_p2 value of type Property", copiedStereotypeApplicationP3Value.get(0).eGet(dataTypeProperty2) instanceof Property); //$NON-NLS-1$
+
+ assertTrue("the copied data type should have a non null dt_p1 value of type Class", originalStereotypeApplicationP3Value.get(0).eGet(dataTypeProperty1) instanceof Class); //$NON-NLS-1$
+ assertTrue("the copied data type should have a non null dt_p2 value of type Property", originalStereotypeApplicationP3Value.get(0).eGet(dataTypeProperty2) instanceof Property); //$NON-NLS-1$
+
+ assertTrue("since dt_p1 is a reference then the original value and the copied one should be the same", originalStereotypeApplicationP3Value.get(0).eGet(dataTypeProperty1).equals(copiedStereotypeApplicationP3Value.get(0).eGet(dataTypeProperty1))); //$NON-NLS-1$
+ assertFalse("since dt_p2 is a containement association then the value should be copied (the original value and the copied one should be different)", //$NON-NLS-1$
+ originalStereotypeApplicationP3Value.get(0).eGet(dataTypeProperty2).equals(copiedStereotypeApplicationP3Value.get(0).eGet(dataTypeProperty2)));
+ }
+
+ protected EObject getStereotypeApplication(Class stereotypedClass, String stereotypeName) {
+ EObject originalStereotypeApplication = null;
+ List<EObject> originalStereotypeApplications = stereotypedClass.getStereotypeApplications();
+ assertFalse("the stereotyped class should have at least one stereotype", originalStereotypeApplications.isEmpty()); //$NON-NLS-1$
+ for (Iterator<EObject> iterator = originalStereotypeApplications.iterator(); iterator.hasNext();) {
+ EObject stereotypeApplication = iterator.next();
+ if (stereotypeApplication.eClass().getName().equals(stereotypeName)) {
+ originalStereotypeApplication = stereotypeApplication;
+ break;
+ }
+ }
+ assertNotNull("the stereotype " + stereotypeName + " should be applied on " + stereotypedClass.getName(), originalStereotypeApplication); //$NON-NLS-1$ //$NON-NLS-2$
+ return originalStereotypeApplication;
+ }
+
+ protected EStructuralFeature getStructuralFeature(EObject eobject, String featureName) {
+ EStructuralFeature propertyStructuralFeature = eobject.eClass().getEStructuralFeature(featureName);
+ assertNotNull("the element should have a property named: " + featureName, propertyStructuralFeature); //$NON-NLS-1$
+ return propertyStructuralFeature;
+ }
+
+}

Back to the top