* @throws IOException
* @throws ComponentRegistryException
*/
public void testSaveAndLoad() throws ComponentException, GraphException, IOException, ComponentRegistryException {
Workflow workflow = this.workflowCreator.createComplexMathWorkflow();
XmlElement workflowElement = workflow.toXML();
File file = new File(this.temporalDirectory, "complex-math.xwf");
XMLUtil.saveXML(workflowElement, file);
XmlElement loadedWorkflowElement = XMLUtil.loadXML(file);
Workflow loadedWorkflow = new Workflow(loadedWorkflowElement);
Graph loadedGraph = loadedWorkflow.getGraph();
Collection<WSNode> loadedWSNodes = GraphUtil.getWSNodes(loadedGraph);
assertTrue(loadedWSNodes.size() != 0);
for (WSNode loadedWSNode : loadedWSNodes) {
assertNotNull(loadedWSNode.getComponent());