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 shouldUpdateDataSetName() {
          // given
          final DataSetMetadata metadata = new DataSetMetadata();
          metadata.setId("ds-1234");
          metadata.setName("My updated name");
  
          final PersistentPreparation preparation = mock(PersistentPreparation.class);
  
          when(preparationRepository.list(eq(PersistentPreparation.class), eq(TqlBuilder.eq("dataSetId", "ds-1234"))))
                  .thenReturn(Stream.of(preparation), Stream.of(preparation));
          when(datasetClient.getDataSetMetadata(eq("ds-1234"))).thenReturn(metadata);
  
          // when
          preparationEventUtil.performUpdateEvent(metadata.getId());
  
          // then
          verify(preparation, times(1)).setDataSetName(eq("My updated name"));
      }
test_case.class_method_signature: PreparationEventUtilTest.shouldUpdateDataSetName()
test_case.full_signature: @Test public void shouldUpdateDataSetName()
test_case.identifier: shouldUpdateDataSetName
test_case.invocations: setId setName mock thenReturn when list eq eq eq of of thenReturn when getDataSetMetadata eq performUpdateEvent getId setDataSetName verify times eq
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldUpdateDataSetName()
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)