test_class.declarator: mapper = new ObjectMapper()
test_class.modifier: private final
test_class.original_string: private final ObjectMapper mapper = new ObjectMapper();
test_class.type: ObjectMapper
test_class.var_name: mapper
test_class.declarator: strategy
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private PreparationExportStrategy strategy;
test_class.type: PreparationExportStrategy
test_class.var_name: strategy
test_class.declarator: factory
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private TransformerFactory factory;
test_class.type: TransformerFactory
test_class.var_name: factory
test_class.declarator: formatRegistrationService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private FormatRegistrationService formatRegistrationService;
test_class.type: FormatRegistrationService
test_class.var_name: formatRegistrationService
test_class.declarator: applicationContext
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ApplicationContext applicationContext;
test_class.type: ApplicationContext
test_class.var_name: applicationContext
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: contentCache
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ContentCache contentCache;
test_class.type: ContentCache
test_class.var_name: contentCache
test_class.declarator: transformer
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Transformer transformer;
test_class.type: Transformer
test_class.var_name: transformer
test_class.declarator: preparationSummaryGet
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private PreparationSummaryGet preparationSummaryGet;
test_class.type: PreparationSummaryGet
test_class.var_name: preparationSummaryGet
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.file: dataprep-transformation/src/test/java/org/talend/dataprep/transformation/service/export/PreparationExportStrategyTest.java
test_class.identifier: PreparationExportStrategyTest
test_case.body: @Test
      public void shouldUsedHeadPreparation() throws IOException {
          // Given
          final ExportParameters parameters = new ExportParameters();
          parameters.setExportType("JSON");
          parameters.setPreparationId("prep-1234");
          parameters.setStepId("head");
  
          final PreparationDTO preparation = new PreparationDTO();
          preparation.getSteps().add(Step.ROOT_STEP.id());
          preparation.setId("prep-1234");
          preparation.setHeadId("head");
          configurePreparation(preparation, "prep-1234", "head");
  
          // When
          final StreamingResponseBody body = strategy.execute(parameters);
          body.writeTo(new NullOutputStream());
  
          // Then
          final ArgumentCaptor<Configuration> captor = ArgumentCaptor.forClass(Configuration.class);
          verify(transformer).buildExecutable(any(), captor.capture());
          assertEquals("prep-1234", captor.getValue().getPreparationId());
          assertEquals("head", captor.getValue().getPreparation().getHeadId());
      }
test_case.class_method_signature: PreparationExportStrategyTest.shouldUsedHeadPreparation()
test_case.full_signature: @Test public void shouldUsedHeadPreparation()
test_case.identifier: shouldUsedHeadPreparation
test_case.invocations: setExportType setPreparationId setStepId add getSteps id setId setHeadId configurePreparation execute writeTo forClass buildExecutable verify any capture assertEquals getPreparationId getValue assertEquals getHeadId getPreparation getValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldUsedHeadPreparation()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(PreparationExportStrategy.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(PreparationExportStrategy.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
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: 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.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.file: dataprep-transformation/src/main/java/org/talend/dataprep/transformation/service/export/PreparationExportStrategy.java
focal_class.identifier: PreparationExportStrategy
focal_class.class_method_signature: PreparationExportStrategy.test(final ExportParameters parameters)
focal_class.full_signature: @Override public boolean test(final ExportParameters parameters)
focal_class.identifier: test
focal_class.modifiers: @Override public
focal_class.parameters: (final ExportParameters parameters)
focal_class.return: boolean
focal_class.signature: boolean test(final ExportParameters parameters)
focal_class.class_method_signature: PreparationExportStrategy.execute(final ExportParameters parameters)
focal_class.full_signature: @Override public StreamingResponseBody execute(final ExportParameters parameters)
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: (final ExportParameters parameters)
focal_class.return: StreamingResponseBody
focal_class.signature: StreamingResponseBody execute(final ExportParameters parameters)
focal_class.class_method_signature: PreparationExportStrategy.performPreparation(final ExportParameters parameters, final OutputStream outputStream)
focal_class.full_signature: public void performPreparation(final ExportParameters parameters, final OutputStream outputStream)
focal_class.identifier: performPreparation
focal_class.modifiers: public
focal_class.parameters: (final ExportParameters parameters, final OutputStream outputStream)
focal_class.return: void
focal_class.signature: void performPreparation(final ExportParameters parameters, final OutputStream outputStream)
focal_class.superclass: extends BaseSampleExportStrategy
focal_method.body: @Override
      public StreamingResponseBody execute(final ExportParameters parameters) {
          final String formatName = parameters.getExportType();
          final ExportFormat format = getFormat(formatName);
          ExportUtils.setExportHeaders(parameters.getExportName(), //
                  parameters.getArguments().get(ExportFormat.PREFIX + CSVFormat.ParametersCSV.ENCODING), //
                  format);
  
          return outputStream -> performPreparation(parameters, outputStream);
      }
focal_method.class_method_signature: PreparationExportStrategy.execute(final ExportParameters parameters)
focal_method.full_signature: @Override public StreamingResponseBody execute(final ExportParameters parameters)
focal_method.identifier: execute
focal_method.invocations: getExportType getFormat setExportHeaders getExportName get getArguments performPreparation
focal_method.modifiers: @Override public
focal_method.parameters: (final ExportParameters parameters)
focal_method.return: StreamingResponseBody
focal_method.signature: StreamingResponseBody execute(final ExportParameters parameters)