Source:
public void initialisation() { model = editorFixture.getModel(); Assert.assertNotNull("The model cannot be null", model); Assert.assertFalse(model.getProfileApplications().isEmpty()); profile = model.getAppliedProfile(PROFILE_NAME); Assert.assertEquals("Profile is not the one Expected", PROFILE_NAME, profile.getName()); domain = editorFixture.getEditingDomain(); Assert.assertNotNull("Domain should not be null", domain); stereotypeA = profile.getOwnedStereotype(STEREO_A); Assert.assertNotNull("Stereotype is not the one expected", stereotypeA); Assert.assertEquals("Stereotype is not the one expected", STEREO_A, stereotypeA.getName()); stereotypeB = profile.getOwnedStereotype(STEREO_B); Assert.assertNotNull("Stereotype is not the one expected", stereotypeB); Assert.assertEquals("Stereotype is not the one expected", STEREO_B, stereotypeB.getName()); stereotypeC = profile.getOwnedStereotype(STEREO_C); Assert.assertNotNull("Stereotype is not the one expected", stereotypeC); Assert.assertEquals("Stereotype is not the one expected", STEREO_C, stereotypeC.getName()); mainDiagram = DiagramUtils.getNotationDiagram(editorFixture.getModelSet(), CLASS_DIAGRAM_NAME); Assert.assertEquals("Current opened diagram is not the expected one", CLASS_DIAGRAM_NAME, mainDiagram.getName()); editorFixture.getPageManager().openPage(mainDiagram); editorFixture.getPageManager().selectPage(mainDiagram); editorFixture.flushDisplayEvents(); List<Property> properties = stereotypeA.getAllAttributes(); prop1 = stereotypeA.getAttribute(PROPERTY1, null); prop2 = stereotypeA.getAttribute(PROPERTY2, null); Assert.assertTrue("The Properties contains PropertyA1", properties.contains(prop1)); Assert.assertTrue("The Properties contains PropertyA2", properties.contains(prop2)); }

Target:
public void initialisation() { model = editorFixture.getModel(); Assert.assertNotNull("The model cannot be null", model); Assert.assertFalse("These is no applied profile on the model", model.getProfileApplications().isEmpty()); profile = model.getAppliedProfile(PROFILE_NAME); Assert.assertEquals("Profile is not the one Expected", PROFILE_NAME, profile.getName()); domain = editorFixture.getEditingDomain(); Assert.assertNotNull("Domain should not be null", domain); stereotypeA = profile.getOwnedStereotype(STEREO_A); Assert.assertNotNull("Stereotype is not the one expected", stereotypeA); Assert.assertEquals("Stereotype is not the one expected", STEREO_A, stereotypeA.getName()); stereotypeB = profile.getOwnedStereotype(STEREO_B); Assert.assertNotNull("Stereotype is not the one expected", stereotypeB); Assert.assertEquals("Stereotype is not the one expected", STEREO_B, stereotypeB.getName()); stereotypeC = profile.getOwnedStereotype(STEREO_C); Assert.assertNotNull("Stereotype is not the one expected", stereotypeC); Assert.assertEquals("Stereotype is not the one expected", STEREO_C, stereotypeC.getName()); mainDiagram = DiagramUtils.getNotationDiagram(editorFixture.getModelSet(), CLASS_DIAGRAM_NAME); Assert.assertEquals("Current opened diagram is not the expected one", CLASS_DIAGRAM_NAME, mainDiagram.getName()); editorFixture.getPageManager().openPage(mainDiagram); editorFixture.getPageManager().selectPage(mainDiagram); editorFixture.flushDisplayEvents(); List<Property> properties = stereotypeA.getAllAttributes(); prop1 = stereotypeA.getAttribute(PROPERTY1, null); prop2 = stereotypeA.getAttribute(PROPERTY2, null); Assert.assertTrue("The Properties contains PropertyA1", properties.contains(prop1)); Assert.assertTrue("The Properties contains PropertyA2", properties.contains(prop2)); }