test_class.declarator: task
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private AddLanguageToActionExtractDatePart task;
test_class.type: AddLanguageToActionExtractDatePart
test_class.var_name: task
test_class.declarator: preparationRepository
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private PreparationRepository preparationRepository;
test_class.type: PreparationRepository
test_class.var_name: preparationRepository
test_class.file: dataprep-upgrade/src/test/java/org/talend/dataprep/upgrade/to_2_4_0_PE/AddLanguageToActionExtractDatePartTest.java
test_class.identifier: AddLanguageToActionExtractDatePartTest
test_class.superclass: extends Base_2_4_0_PE_Test
test_case.body: @Test
      public void shouldAddCreateNewColumnParameter() {
          // given a datastore built with one preparation with 3 steps
          // when
          task.run();
  
          // then
          Optional<Action> extractDatePart = preparationRepository //
                  .list(PreparationActions.class) //
                  .flatMap(a -> a.getActions().stream()) //
                  .filter(a -> ExtractDateTokens.ACTION_NAME.equals(a.getName()))
                  .findAny();
  
          assertTrue(extractDatePart.isPresent());
          assertEquals(Locale.getDefault().getLanguage(),
                  extractDatePart.get().getParameters().get(ExtractDateTokens.LANGUAGE));
  
      }
test_case.class_method_signature: AddLanguageToActionExtractDatePartTest.shouldAddCreateNewColumnParameter()
test_case.full_signature: @Test public void shouldAddCreateNewColumnParameter()
test_case.identifier: shouldAddCreateNewColumnParameter
test_case.invocations: run findAny filter flatMap list stream getActions equals getName assertTrue isPresent assertEquals getLanguage getDefault get getParameters get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldAddCreateNewColumnParameter()
focal_class.declarator: preparationRepository
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private PreparationRepository preparationRepository;
focal_class.type: PreparationRepository
focal_class.var_name: preparationRepository
focal_class.file: dataprep-upgrade/src/main/java/org/talend/dataprep/upgrade/to_2_4_0_PE/AddLanguageToActionExtractDatePart.java
focal_class.identifier: AddLanguageToActionExtractDatePart
focal_class.class_method_signature: AddLanguageToActionExtractDatePart.run()
focal_class.full_signature: @Override public void run()
focal_class.identifier: run
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void run()
focal_class.class_method_signature: AddLanguageToActionExtractDatePart.getOrder()
focal_class.full_signature: @Override public int getOrder()
focal_class.identifier: getOrder
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getOrder()
focal_class.class_method_signature: AddLanguageToActionExtractDatePart.getTarget()
focal_class.full_signature: @Override public UpgradeTask.target getTarget()
focal_class.identifier: getTarget
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: UpgradeTask.target
focal_class.signature: UpgradeTask.target getTarget()
focal_class.superclass: extends BaseUpgradeTaskTo_2_4_0_PE
focal_method.body: @Override
      public void run() {
          AddLanguageToActionExtractDatePartUpgrade.upgradeActions(preparationRepository);
      }
focal_method.class_method_signature: AddLanguageToActionExtractDatePart.run()
focal_method.full_signature: @Override public void run()
focal_method.identifier: run
focal_method.invocations: upgradeActions
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void run()