CaseExecutionStateTransitionCollector stateTransitionCollector = new CaseExecutionStateTransitionCollector();
// given
// a case definition
CmmnCaseDefinition caseDefinition = new CaseDefinitionBuilder("Case1")
.listener("complete", stateTransitionCollector)
.createActivity("A")
.listener("terminate", stateTransitionCollector)
.listener("complete", stateTransitionCollector)
.behavior(new TaskWaitState())