MappingAwareActivityBehaviorFactory extends DefaultActivityBehaviorFactory { @Override public UserTaskActivityBehavior createUserTaskActivityBehavior(UserTask userTask) { return new MappingAwareUserTaskBehavior(userTask, variablesCalculator); } MappingAwareActivityBehaviorFactory(
        VariablesCalculator variablesCalculator,
                                               ProcessVariablesInitiator processVariablesInitiator); @Override UserTaskActivityBehavior createUserTaskActivityBehavior(UserTask userTask);  }
@Test public void createUserTaskActivityBehaviorShouldReturnMappingAwareUserTaskBehavior() { assertThat(factory.createUserTaskActivityBehavior(mock(UserTask.class))) .isInstanceOf(MappingAwareUserTaskBehavior.class); }