BpmnActivityBehavior implements Serializable { public void performDefaultOutgoingBehavior(ExecutionEntity activityExecution) { performOutgoingBehavior(activityExecution, true, false); }  void performDefaultOutgoingBehavior(ExecutionEntity activityExecution); void performIgnoreConditionsOutgoingBehavior(ExecutionEntity activityExecution); void setVariablesCalculator(VariablesCalculator variablesCalculator);  }
@Test public void performDefaultOutgoingBehavior_should_propagateVariablesToParentAndPlanContinuation() { ExecutionEntity parentExecution = mock(ExecutionEntity.class); Map<String, Object> variablesLocal = Collections.singletonMap("myVar", "value"); ExecutionEntity execution = buildExecution(parentExecution, variablesLocal); Map<String, Object> calculatedVariables = Collections .singletonMap("mappedVar", "mappedValue"); given(variablesCalculator.calculateOutPutVariables( MappingExecutionContext.buildMappingExecutionContext(execution), variablesLocal)) .willReturn(calculatedVariables); bpmnActivityBehavior.performDefaultOutgoingBehavior(execution); verify(parentExecution).setVariables(calculatedVariables); verify(agenda).planTakeOutgoingSequenceFlowsOperation(execution, true); }