test_class.declarator: preparationEventUtil
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private PreparationEventUtil preparationEventUtil;
test_class.type: PreparationEventUtil
test_class.var_name: preparationEventUtil
test_class.declarator: preparationRepository
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private PreparationRepository preparationRepository;
test_class.type: PreparationRepository
test_class.var_name: preparationRepository
test_class.declarator: preparationUtils
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private PreparationUtils preparationUtils;
test_class.type: PreparationUtils
test_class.var_name: preparationUtils
test_class.declarator: datasetClient
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private DatasetClient datasetClient;
test_class.type: DatasetClient
test_class.var_name: datasetClient
test_class.declarator: securityProxy
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SecurityProxy securityProxy;
test_class.type: SecurityProxy
test_class.var_name: securityProxy
test_class.declarator: cacheKeyGenerator
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private CacheKeyGenerator cacheKeyGenerator;
test_class.type: CacheKeyGenerator
test_class.var_name: cacheKeyGenerator
test_class.declarator: cacheEventProcessingUtil
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private CacheEventProcessingUtil cacheEventProcessingUtil;
test_class.type: CacheEventProcessingUtil
test_class.var_name: cacheEventProcessingUtil
test_class.file: dataprep-preparation/src/test/java/org/talend/dataprep/preparation/event/PreparationEventUtilTest.java
test_class.identifier: PreparationEventUtilTest
test_case.body: @Test
      public void shouldRemoveStepRowMetadata() {
          // given
          final DataSetMetadata metadata = new DataSetMetadata();
          metadata.setId("ds-1234");
  
          final Step step1 = new Step();
          step1.setId(UUID.randomUUID().toString());
          step1.setRowMetadata("srmd-1");
          final Step step2 = new Step();
          step2.setId(UUID.randomUUID().toString());
          step2.setRowMetadata("srmd-2");
          step2.setParent(step1.id());
          final Step step3 = new Step();
          step3.setId(UUID.randomUUID().toString());
          step3.setRowMetadata(null); // Intentionally left to null
          step3.setParent(step2.id());
  
          final PersistentPreparation preparation = new PersistentPreparation();
          preparation.setHeadId(step3.id());
  
          when(preparationUtils.listSteps(eq(preparation.getHeadId()), eq(preparationRepository)))
                  .thenReturn(Arrays.asList(Step.ROOT_STEP, step1, step2, step3));
          when(preparationRepository.list(eq(PersistentPreparation.class), eq(TqlBuilder.eq("dataSetId", "ds-1234"))))
                  .thenReturn(Stream.of(preparation), Stream.of(preparation));
          when(preparationRepository.get(eq(step1.id()), eq(Step.class))).thenReturn(step1);
          when(preparationRepository.get(eq(step2.id()), eq(Step.class))).thenReturn(step2);
          when(datasetClient.getDataSetMetadata(any())).thenReturn(metadata);
  
          // when
          preparationEventUtil.performUpdateEvent(metadata.getId());
  
          // then
          verify(cacheEventProcessingUtil, times(2)).processCleanCacheEvent(any(ContentCacheKey.class), any());
          verify(preparationRepository, times(1)).add(any(Preparation.class));
          verify(preparationRepository, times(1)).remove(eq(StepRowMetadata.class),
                  eq(TqlBuilder.in("id", "srmd-1", "srmd-2")));
          verify(securityProxy, times(2)).asTechnicalUser();
          verify(securityProxy, times(1)).asTechnicalUserForDataSet();
          verify(securityProxy, times(3)).releaseIdentity();
      }
test_case.class_method_signature: PreparationEventUtilTest.shouldRemoveStepRowMetadata()
test_case.full_signature: @Test public void shouldRemoveStepRowMetadata()
test_case.identifier: shouldRemoveStepRowMetadata
test_case.invocations: setId setId toString randomUUID setRowMetadata setId toString randomUUID setRowMetadata setParent id setId toString randomUUID setRowMetadata setParent id setHeadId id thenReturn when listSteps eq getHeadId eq asList thenReturn when list eq eq eq of of thenReturn when get eq id eq thenReturn when get eq id eq thenReturn when getDataSetMetadata any performUpdateEvent getId processCleanCacheEvent verify times any any add verify times any remove verify times eq eq in asTechnicalUser verify times asTechnicalUserForDataSet verify times releaseIdentity verify times
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldRemoveStepRowMetadata()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(PreparationEventUtil.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(PreparationEventUtil.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
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.declarator: preparationUtils
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private PreparationUtils preparationUtils;
focal_class.type: PreparationUtils
focal_class.var_name: preparationUtils
focal_class.declarator: datasetClient
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private DatasetClient datasetClient;
focal_class.type: DatasetClient
focal_class.var_name: datasetClient
focal_class.declarator: cacheKeyGenerator
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private CacheKeyGenerator cacheKeyGenerator;
focal_class.type: CacheKeyGenerator
focal_class.var_name: cacheKeyGenerator
focal_class.declarator: cacheEventProcessingUtil
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private CacheEventProcessingUtil cacheEventProcessingUtil;
focal_class.type: CacheEventProcessingUtil
focal_class.var_name: cacheEventProcessingUtil
focal_class.declarator: securityProxy
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SecurityProxy securityProxy;
focal_class.type: SecurityProxy
focal_class.var_name: securityProxy
focal_class.file: dataprep-preparation/src/main/java/org/talend/dataprep/preparation/event/PreparationEventUtil.java
focal_class.identifier: PreparationEventUtil
focal_class.class_method_signature: PreparationEventUtil.performUpdateEvent(String datasetId)
focal_class.full_signature: public void performUpdateEvent(String datasetId)
focal_class.identifier: performUpdateEvent
focal_class.modifiers: public
focal_class.parameters: (String datasetId)
focal_class.return: void
focal_class.signature: void performUpdateEvent(String datasetId)
focal_class.class_method_signature: PreparationEventUtil.cleanTransformationCache(String datasetId)
focal_class.full_signature: private void cleanTransformationCache(String datasetId)
focal_class.identifier: cleanTransformationCache
focal_class.modifiers: private
focal_class.parameters: (String datasetId)
focal_class.return: void
focal_class.signature: void cleanTransformationCache(String datasetId)
focal_class.class_method_signature: PreparationEventUtil.cleanTransformationMetadataCache(String datasetId)
focal_class.full_signature: private void cleanTransformationMetadataCache(String datasetId)
focal_class.identifier: cleanTransformationMetadataCache
focal_class.modifiers: private
focal_class.parameters: (String datasetId)
focal_class.return: void
focal_class.signature: void cleanTransformationMetadataCache(String datasetId)
focal_class.class_method_signature: PreparationEventUtil.updatesFromDataSetMetadata(String dataSetId)
focal_class.full_signature: private void updatesFromDataSetMetadata(String dataSetId)
focal_class.identifier: updatesFromDataSetMetadata
focal_class.modifiers: private
focal_class.parameters: (String dataSetId)
focal_class.return: void
focal_class.signature: void updatesFromDataSetMetadata(String dataSetId)
focal_method.body: public void performUpdateEvent(String datasetId) {
          LOGGER.info("Performing update event for dataset {}", datasetId);
          cleanTransformationCache(datasetId);
          cleanTransformationMetadataCache(datasetId);
          updatesFromDataSetMetadata(datasetId);
      }
focal_method.class_method_signature: PreparationEventUtil.performUpdateEvent(String datasetId)
focal_method.full_signature: public void performUpdateEvent(String datasetId)
focal_method.identifier: performUpdateEvent
focal_method.invocations: info cleanTransformationCache cleanTransformationMetadataCache updatesFromDataSetMetadata
focal_method.modifiers: public
focal_method.parameters: (String datasetId)
focal_method.return: void
focal_method.signature: void performUpdateEvent(String datasetId)