Source:
<code>private void processTestOnTransientLayerDecoration(DecorationDescription mbd, String layerName) throws InterruptedException { activateBasicLayer(dDiagram, layerName); final List<DDiagramElement> elements = Lists.newArrayList(dDiagram.getOwnedDiagramElements()); checkTransientDecoration(elements, mbd); Assert.assertEquals("The session should be still be in sync when <START> appliying a <END> transient layer", SessionStatus.SYNC, session.getStatus()); DialectUIManager.INSTANCE.closeEditor(editor, true); editor = DialectUIManager.INSTANCE.openEditor(session, dDiagram, new NullProgressMonitor()); checkTransientDecoration(elements, mbd); URI uri = session.getSessionResource().getURI(); closeSession(session); TestsUtil.waitUntil(new OpenedSessionsCondition(0)); createSession(uri); Job.getJobManager().join(ResourceSyncClientNotifier.FAMILY, new NullProgressMonitor()); session.open(new NullProgressMonitor()); TestsUtil.waitUntil(new OpenedSessionsCondition(1)); dDiagram = (DDiagram) ((DAnalysis) session.getSessionResource().getContents().get(0)).getOwnedViews().get(0).getOwnedRepresentationDescriptors().get(0) .getRepresentation(); editor = DialectUIManager.INSTANCE.openEditor(session, dDiagram, new NullProgressMonitor()); Assert.assertEquals("Only one layer should be active", 1, dDiagram.getActivatedLayers().size()); Assert.assertEquals("Only the default layer should be active", "Default", dDiagram.getActivatedLayers().get(0).getName()); checkNoTransientDecoration(dDiagram.getOwnedDiagramElements()); }</code><technical_language>applying</technical_language>

Target:
private void processTestOnTransientLayerDecoration(DecorationDescription mbd, String layerName) throws InterruptedException { activateBasicLayer(dDiagram, layerName); final List<DDiagramElement> elements = Lists.newArrayList(dDiagram.getOwnedDiagramElements()); checkTransientDecoration(elements, mbd); Assert.assertEquals("The session should be still be in sync when applying a transient layer", SessionStatus.SYNC, session.getStatus()); DialectUIManager.INSTANCE.closeEditor(editor, true); editor = DialectUIManager.INSTANCE.openEditor(session, dDiagram, new NullProgressMonitor()); checkTransientDecoration(elements, mbd); URI uri = session.getSessionResource().getURI(); closeSession(session); TestsUtil.waitUntil(new OpenedSessionsCondition(0)); createSession(uri); Job.getJobManager().join(ResourceSyncClientNotifier.FAMILY, new NullProgressMonitor()); session.open(new NullProgressMonitor()); TestsUtil.waitUntil(new OpenedSessionsCondition(1)); dDiagram = (DDiagram) ((DAnalysis) session.getSessionResource().getContents().get(0)).getOwnedViews().get(0).getOwnedRepresentationDescriptors().get(0) .getRepresentation(); editor = DialectUIManager.INSTANCE.openEditor(session, dDiagram, new NullProgressMonitor()); Assert.assertEquals("Only one layer should be active", 1, dDiagram.getActivatedLayers().size()); Assert.assertEquals("Only the default layer should be active", "Default", dDiagram.getActivatedLayers().get(0).getName()); Assert.assertEquals("No transient layer should be active", 0, dDiagram.getActivatedTransientLayers().size()); checkNoTransientDecoration(dDiagram.getOwnedDiagramElements()); }