Collection<ModelElementInstance> events = modelInstance.getModelElementsByType(model.getType(Event.class));
assertEquals(2, events.size());
Collection<ModelElementInstance> tasks = modelInstance.getModelElementsByType(model.getType(Task.class));
assertEquals(1, tasks.size());
Process process = (Process) modelInstance.getDefinitions().getRootElements().iterator().next();
assertEquals(PROCESS_ID, process.getId());
assertTrue(process.isExecutable());
ServiceTask serviceTask = ModelExecutionContextServiceTask.serviceTask;
assertNotNull(serviceTask);
assertEquals(ModelExecutionContextServiceTask.class.getName(), serviceTask.getCamundaClass());
}