Source:
public void testMessageSync() { IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); store.setValue(Messages.PREF_EXECUTION_SPECIFICATION_SYNC_MSG, "CHOICE_NONE"); createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), new Dimension(62, 200)); createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), new Dimension(62, 200)); final LifelineEditPart lifeline1 = (LifelineEditPart)getRootEditPart().getChildren().get(0); final LifelineEditPart lifeline2 = (LifelineEditPart)getRootEditPart().getChildren().get(1); waitForComplete(); createNode(UMLElementTypes.BehaviorExecutionSpecification_Shape, lifeline1, new Point(131, 140), new Dimension(20, 60)); createNode(UMLElementTypes.BehaviorExecutionSpecification_Shape, lifeline2, new Point(331, 200), new Dimension(20, 60)); waitForComplete(); IGraphicalEditPart source = (IGraphicalEditPart)lifeline1.getChildren().get(1); IGraphicalEditPart target = (IGraphicalEditPart)lifeline2.getChildren().get(1); createLink(UMLElementTypes.Message_SynchEdge, source, target, getAbsoluteCenter(source), getAbsoluteCenter(target).translate(0, -28)); waitForComplete(); assertTrue(CREATION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 1); assertTrue(CREATION + TEST_THE_UNDO, getDiagramCommandStack().canUndo()); getEMFCommandStack().undo(); assertTrue(CREATION + TEST_THE_UNDO, source.getSourceConnections().size() == 0); assertTrue(CREATION + TEST_THE_REDO, getDiagramCommandStack().canRedo()); getEMFCommandStack().redo(); assertTrue(CREATION + TEST_THE_REDO, source.getSourceConnections().size() == 1); }

Target:
public void testMessageSync() { IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); store.setValue(CustomDiagramGeneralPreferencePage.PREF_EXECUTION_SPECIFICATION_SYNC_MSG, "CHOICE_NONE"); createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), new Dimension(62, 200)); createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(300, 100), new Dimension(62, 200)); final LifelineEditPart lifeline1 = (LifelineEditPart)getRootEditPart().getChildren().get(0); final LifelineEditPart lifeline2 = (LifelineEditPart)getRootEditPart().getChildren().get(1); waitForComplete(); createNode(UMLElementTypes.BehaviorExecutionSpecification_Shape, lifeline1, new Point(131, 140), new Dimension(20, 60)); createNode(UMLElementTypes.BehaviorExecutionSpecification_Shape, lifeline2, new Point(331, 200), new Dimension(20, 60)); waitForComplete(); IGraphicalEditPart source = (IGraphicalEditPart)lifeline1.getChildren().get(1); IGraphicalEditPart target = (IGraphicalEditPart)lifeline2.getChildren().get(1); createLink(UMLElementTypes.Message_SynchEdge, source, target, getAbsoluteCenter(source), getAbsoluteCenter(target).translate(0, -28)); waitForComplete(); assertTrue(CREATION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 1); assertTrue(CREATION + TEST_THE_UNDO, getDiagramCommandStack().canUndo()); getEMFCommandStack().undo(); assertTrue(CREATION + TEST_THE_UNDO, source.getSourceConnections().size() == 0); assertTrue(CREATION + TEST_THE_REDO, getDiagramCommandStack().canRedo()); getEMFCommandStack().redo(); assertTrue(CREATION + TEST_THE_REDO, source.getSourceConnections().size() == 1); }