public void testProcessorAsXMLRoundTrip() throws EditException,
ArtifactNotFoundException, ArtifactStateException,
ClassNotFoundException, InstantiationException,
IllegalAccessException, JDOMException, IOException,
ActivityConfigurationException {
ProcessorImpl p = (ProcessorImpl)new EditsImpl().createProcessor("a_processor");
DispatchStackImpl stack = p.getDispatchStack();
new AddDispatchLayerEdit(stack, new Parallelize(), 0).doEdit();
new AddDispatchLayerEdit(stack, new Retry(2, 50, 2000, 1), 1).doEdit();
new AddDispatchLayerEdit(stack, new DummyInvokerLayer(), 2).doEdit();
new CreateProcessorInputPortEdit(p, "Input1", 1).doEdit();
new CreateProcessorInputPortEdit(p, "Input2", 0).doEdit();
Element e = p.asXML();
ProcessorImpl p2 = (ProcessorImpl)new EditsImpl().createProcessor("a_processor");
p2.configureFromElement(e);
Element e2 = p2.asXML();
XMLOutputter xo = new XMLOutputter();
assertTrue(xo.outputString(e).equals(xo.outputString(e2)));
}