}
@Test
public void testSequenceFlowUnmarshalling() throws Exception {
Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("sequenceFlow.json"), "").getContents().get(0));
assertTrue(definitions.getRootElements().size() == 1);
Process process = getRootProcess(definitions);
assertTrue(process.getFlowElements().get(0) instanceof Task);
Task task = (Task) process.getFlowElements().get(0);
assertEquals("task1", task.getName());
Task task2 = (Task) process.getFlowElements().get(1);
assertEquals("task2", task2.getName());
SequenceFlow flow = (SequenceFlow) process.getFlowElements().get(2);
assertEquals("seqFlow", flow.getName());
assertEquals(task, flow.getSourceRef());
assertEquals(task2, flow.getTargetRef());
definitions.eResource().save(System.out, Collections.emptyMap());
}