@Test
public void testAssociationUnmarshalling() throws Exception {
Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("association.json"), "").getContents().get(0));
assertTrue(definitions.getRootElements().size() == 1);
Process process = getRootProcess(definitions);
Task g = (Task) process.getFlowElements().get(0);
assertEquals("task", g.getName());
TextAnnotation textA = (TextAnnotation) process.getArtifacts().get(0);
Association association = (Association) process.getArtifacts().get(1);
assertEquals(g, association.getSourceRef());
assertEquals(textA, association.getTargetRef());
assertEquals(AssociationDirection.NONE, association.getAssociationDirection());
definitions.eResource().save(System.out, Collections.emptyMap());
}