public void testIntermediateThrowMessageEventUnmarshalling() throws Exception {
Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("intermediateThrowMessageEvent.json"), "").getContents().get(0));
assertTrue(definitions.getRootElements().size() == 3);
Process process = getRootProcess(definitions);
ThrowEvent g = (ThrowEvent) process.getFlowElements().get(0);
assertEquals("throw message event", g.getName());
assertTrue(g.getEventDefinitions().iterator().next() instanceof MessageEventDefinition);
definitions.eResource().save(System.out, Collections.emptyMap());
}