test_class.declarator: task
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private SetStepRowMetadata task;
test_class.type: SetStepRowMetadata
test_class.var_name: task
test_class.declarator: repository
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private PreparationRepository repository;
test_class.type: PreparationRepository
test_class.var_name: repository
test_class.declarator: service
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private TransformationService service;
test_class.type: TransformationService
test_class.var_name: service
test_class.declarator: folderRepository
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private FolderRepository folderRepository;
test_class.type: FolderRepository
test_class.var_name: folderRepository
test_class.declarator: preparations
test_class.modifier: private
test_class.original_string: private List<PersistentPreparation> preparations;
test_class.type: List<PersistentPreparation>
test_class.var_name: preparations
test_class.file: dataprep-upgrade/src/test/java/org/talend/dataprep/upgrade/to_2_1_0_PE/SetStepRowMetadataTest.java
test_class.identifier: SetStepRowMetadataTest
test_class.superclass: extends Base_2_1_0_PE_Test
test_case.body: @Test
      public void shouldUpdateStepRowMetadataForEachPersistentPreparation() throws Exception {
          // given
          when(folderRepository.locateEntry(any(), any())).thenReturn(mock(Folder.class));
          when(service.execute(any(ExportParameters.class))).thenReturn(mock(StreamingResponseBody.class));
  
          // when
          task.run();
  
          // then
          verify(service, times(preparations.size())).execute(any());
      }
test_case.class_method_signature: SetStepRowMetadataTest.shouldUpdateStepRowMetadataForEachPersistentPreparation()
test_case.full_signature: @Test public void shouldUpdateStepRowMetadataForEachPersistentPreparation()
test_case.identifier: shouldUpdateStepRowMetadataForEachPersistentPreparation
test_case.invocations: thenReturn when locateEntry any any mock thenReturn when execute any mock run execute verify times size any
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldUpdateStepRowMetadataForEachPersistentPreparation()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(SetStepRowMetadata.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(SetStepRowMetadata.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: repository
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private PreparationRepository repository;
focal_class.type: PreparationRepository
focal_class.var_name: repository
focal_class.declarator: service
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private TransformationService service;
focal_class.type: TransformationService
focal_class.var_name: service
focal_class.declarator: folderRepository
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private FolderRepository folderRepository;
focal_class.type: FolderRepository
focal_class.var_name: folderRepository
focal_class.file: dataprep-upgrade/src/main/java/org/talend/dataprep/upgrade/to_2_1_0_PE/SetStepRowMetadata.java
focal_class.identifier: SetStepRowMetadata
focal_class.interfaces: implements BaseUpgradeTaskTo_2_1_0_PE
focal_class.class_method_signature: SetStepRowMetadata.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: SetStepRowMetadata.setStepRowMetadata(PersistentPreparation preparation, AtomicLong currentProcessingNumber, long total)
focal_class.full_signature: private void setStepRowMetadata(PersistentPreparation preparation, AtomicLong currentProcessingNumber, long total)
focal_class.identifier: setStepRowMetadata
focal_class.modifiers: private
focal_class.parameters: (PersistentPreparation preparation, AtomicLong currentProcessingNumber, long total)
focal_class.return: void
focal_class.signature: void setStepRowMetadata(PersistentPreparation preparation, AtomicLong currentProcessingNumber, long total)
focal_class.class_method_signature: SetStepRowMetadata.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: SetStepRowMetadata.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_method.body: @Override
      public void run() {
  
          final AtomicLong current = new AtomicLong(0);
          final long count = repository.list(PersistentPreparation.class).count();
          LOGGER.info("Starting a potentially long migration task, there are {} preparations to process", count);
          repository.list(PersistentPreparation.class).forEach(p -> setStepRowMetadata(p, current, count));
          LOGGER.info("Finished setting up row metadata in preparation steps");
      }
focal_method.class_method_signature: SetStepRowMetadata.run()
focal_method.full_signature: @Override public void run()
focal_method.identifier: run
focal_method.invocations: count list info forEach list setStepRowMetadata info
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void run()