assertEquals("three",((Transition)node.getLeavingTransitionsList().get(2)).getName());
}
public void testWriteNodeTransitions() throws Exception {
ProcessDefinition processDefinition = new ProcessDefinition();
Node node = new Node("n");
processDefinition.addNode(node);
node.addLeavingTransition(new Transition("one"));
node.addLeavingTransition(new Transition("two"));
node.addLeavingTransition(new Transition("three"));
Element element = toXmlAndParse( processDefinition, "/process-definition/node" );
assertEquals(3, element.elements("transition").size());
assertEquals("one", ((Element)element.elements("transition").get(0)).attributeValue("name"));
assertEquals("two", ((Element)element.elements("transition").get(1)).attributeValue("name"));
assertEquals("three", ((Element)element.elements("transition").get(2)).attributeValue("name"));