Source:
<code>private void checkAllEdgeLabelsDontMove(String sourceEditPartName, String targetEditPartName) { SWTBotGefEditPart sourceEditPart = diagramEditor.getEditPart(sourceEditPartName, IAbstractDiagramNodeEditPart.class); SWTBotGefEditPart targetEditPart = diagramEditor.getEditPart(targetEditPartName, IAbstractDiagramNodeEditPart.class); SWTBotGefConnectionEditPart swtEdgeEditPart = diagramEditor.getConnectionEditPart(sourceEditPart, targetEditPart).get(0); AbstractDiagramEdgeEditPart edgeEditPart = (AbstractDiagramEdgeEditPart) swtEdgeEditPart.part(); List<?> children = edgeEditPart.getChildren(); assertEquals(3, children.size()); AbstractDiagramNameEditPart lablOne = (AbstractDiagramNameEditPart) children.get(0); AbstractDiagramNameEditPart lablTwo = (AbstractDiagramNameEditPart) children.get(1); AbstractDiagramNameEditPart lablThree = (AbstractDiagramNameEditPart) children.get(2); Rectangle originalBoundLabelOne = lablOne.getFigure().getBounds().getTranslated(0, 0); Rectangle originalBoundLabelTwo = lablTwo.getFigure().getBounds().getTranslated(0, 0); Rectangle originalBoundLabelThree = lablThree.getFigure().getBounds().getTranslated(0, 0); edgeEditPart.performRequest(new Request(ActionIds.EDGE_SNAP_BACK)); SWTBotUtils.waitAllUiEvents(); <START> assertEquals(originalBoundLabelOne, lablOne.getFigure().getBounds()); assertEquals(originalBoundLabelTwo, lablTwo.getFigure().getBounds()); assertEquals(originalBoundLabelThree, lablThree.getFigure().getBounds()); <END> }</code><technical_language>Add a failing message</technical_language>

Target:
private void checkAllEdgeLabelsDontMove(String sourceEditPartName, String targetEditPartName) { SWTBotGefEditPart sourceEditPart = diagramEditor.getEditPart(sourceEditPartName, IAbstractDiagramNodeEditPart.class); SWTBotGefEditPart targetEditPart = diagramEditor.getEditPart(targetEditPartName, IAbstractDiagramNodeEditPart.class); SWTBotGefConnectionEditPart swtEdgeEditPart = diagramEditor.getConnectionEditPart(sourceEditPart, targetEditPart).get(0); AbstractDiagramEdgeEditPart edgeEditPart = (AbstractDiagramEdgeEditPart) swtEdgeEditPart.part(); List<?> children = edgeEditPart.getChildren(); assertEquals(3, children.size()); AbstractDiagramNameEditPart lablOne = (AbstractDiagramNameEditPart) children.get(0); AbstractDiagramNameEditPart lablTwo = (AbstractDiagramNameEditPart) children.get(1); AbstractDiagramNameEditPart lablThree = (AbstractDiagramNameEditPart) children.get(2); Rectangle originalBoundLabelOne = lablOne.getFigure().getBounds().getTranslated(0, 0); Rectangle originalBoundLabelTwo = lablTwo.getFigure().getBounds().getTranslated(0, 0); Rectangle originalBoundLabelThree = lablThree.getFigure().getBounds().getTranslated(0, 0); edgeEditPart.performRequest(new Request(ActionIds.EDGE_SNAP_BACK)); SWTBotUtils.waitAllUiEvents(); assertEquals("Label '" + lablOne.getEditText() + "' position has changed whereas it should have not.", originalBoundLabelOne, lablOne.getFigure().getBounds()); assertEquals("Label '" + lablTwo.getEditText() + "' position has changed whereas it should have not.", originalBoundLabelTwo, lablTwo.getFigure().getBounds()); assertEquals("Label '" + lablThree.getEditText() + "' position has changed whereas it should have not.", originalBoundLabelThree, lablThree.getFigure().getBounds()); }