AddXMLSplitterEdit implements Edit<Dataflow> { @Override public void undo() { if (!applied) { throw new RuntimeException( "Attempt to undo edit that was never applied"); } if (linkUpEdit.isApplied()) linkUpEdit.undo(); if (compoundEdit1.isApplied()) compoundEdit1.undo(); applied = false; } AddXMLSplitterEdit(Dataflow dataflow, Activity<?> activity,
			String portName, boolean isInput, Edits edits); @Override Dataflow doEdit(); @Override void undo(); @Override boolean isApplied(); @Override Object getSubject();  }
@Ignore("Integration test") @Test public void testUndo() throws Exception { AddXMLSplitterEdit edit = new AddXMLSplitterEdit(dataflow,activity,"parameters",false, new EditsImpl()); edit.doEdit(); edit.undo(); assertEquals("There should be only 1 processor",1,dataflow.getProcessors().size()); assertEquals("The processor should be called run_eInfo","run_eInfo",dataflow.getProcessors().get(0).getLocalName()); assertEquals("There should be no datalinks",0,dataflow.getLinks().size()); }