MappingAwareUserTaskBehavior extends UserTaskActivityBehavior { @Override protected Map<String, Object> calculateInputVariables(DelegateExecution execution) { return variablesCalculator.calculateInputVariables(execution); } MappingAwareUserTaskBehavior(UserTask userTask, VariablesCalculator variablesCalculator);   }
@Test public void calculateInputVariablesShouldReturnValueFromMappingProvider() { DelegateExecution execution = buildExecution(); Map<String, Object> providerVariables = singletonMap("var", "value"); given(mappingProvider.calculateInputVariables(execution)).willReturn(providerVariables); Map<String, Object> inputVariables = behavior.calculateInputVariables(execution); assertThat(inputVariables).isEqualTo(providerVariables); }