MappingAwareCallActivityBehavior extends CallActivityBehavior { @Override protected Map<String, Object> calculateOutBoundVariables(DelegateExecution execution, Map<String, Object> availableVariables) { return variablesCalculator.calculateOutPutVariables(buildMappingExecutionContext(execution), availableVariables); } MappingAwareCallActivityBehavior(String processDefinitionKey,
                                            List<MapExceptionEntry> mapExceptions,
                                            VariablesCalculator variablesCalculator,
                                            ProcessVariablesInitiator processVariablesInitiator);  MappingAwareCallActivityBehavior(Expression processDefinitionExpression,
                                            List<MapExceptionEntry> mapExceptions,
                                            VariablesCalculator variablesCalculator,
                                            ProcessVariablesInitiator processVariablesInitiator);   }
@Test public void calculateOutBoundVariablesShouldReturnValueFromMappingProvider() { DelegateExecution execution = buildExecution(); Map<String, Object> availableVariables = emptyMap(); Map<String, Object> providerVariables = singletonMap("var", "value"); given(mappingProvider.calculateOutPutVariables(buildMappingExecutionContext(execution), availableVariables)) .willReturn(providerVariables); Map<String, Object> outBoundVariables = behavior.calculateOutBoundVariables(execution, availableVariables); assertThat(outBoundVariables).isEqualTo(providerVariables); }