assertEquals("ActivitiEventType.PROCESS_CANCELLED was expected 1 time.",1,processCancelledEvents.size());
assertTrue("The cause has to be the same as deleteProcessInstance method call",ActivitiCancelledEvent.class.isAssignableFrom(processCancelledEvents.get(0).getClass()));
assertEquals("The process instance has to be the same as in deleteProcessInstance method call",processInstance.getId(),processCancelledEvents.get(0).getProcessInstanceId());
assertEquals("The execution instance has to be the same as in deleteProcessInstance method call",processInstance.getId(),processCancelledEvents.get(0).getExecutionId());
assertEquals("The cause has to be the same as in deleteProcessInstance method call","delete_test",((ActivitiCancelledEvent)processCancelledEvents.get(0)).getCause());
<entry>A process has been cancelled. Dispatched before the process instance is deleted from runtime. Process instance is cancelled by API call <literal>RuntimeService.deleteProcessInstance</entry>literal>.