test_class.declarator: optimizedExportStrategy
test_class.modifier: @Autowired
test_class.original_string: @Autowired
      OptimizedExportStrategy optimizedExportStrategy;
test_class.type: OptimizedExportStrategy
test_class.var_name: optimizedExportStrategy
test_class.declarator: preparationRepository
test_class.modifier: @Autowired
test_class.original_string: @Autowired
      PreparationRepository preparationRepository;
test_class.type: PreparationRepository
test_class.var_name: preparationRepository
test_class.declarator: contentCache
test_class.modifier: @Autowired
test_class.original_string: @Autowired
      ContentCache contentCache;
test_class.type: ContentCache
test_class.var_name: contentCache
test_class.declarator: cacheKeyGenerator
test_class.modifier: @Autowired
test_class.original_string: @Autowired
      CacheKeyGenerator cacheKeyGenerator;
test_class.type: CacheKeyGenerator
test_class.var_name: cacheKeyGenerator
test_class.file: dataprep-transformation/src/test/java/org/talend/dataprep/transformation/service/export/OptimizedExportStrategyTest.java
test_class.identifier: OptimizedExportStrategyTest
test_class.superclass: extends TransformationServiceBaseTest
test_case.body: @Test
      public void testAcceptKO_stepIdIsRootStep() throws Exception {
          // Given
          final String datasetId = "1234";
          final String format = "";
          final String preparation = createEmptyPreparationFromDataset(datasetId, "test");
          applyAction(preparation, "[{}]");
          applyAction(preparation, "[{}]");
  
          final PreparationDTO preparationDetails = getPreparation(preparation);
          final List<String> stepsWithoutRootStep = new ArrayList<>(preparationDetails.getSteps());
          stepsWithoutRootStep.remove(0);
          putTransformationAndMetadataInCacheForSteps(stepsWithoutRootStep, preparation, datasetId, format);
  
          ExportParameters exportParameters = new ExportParameters();
          exportParameters.setPreparationId(preparation);
          exportParameters.setDatasetId(datasetId);
          exportParameters.setExportType(format);
          exportParameters.setFrom(HEAD);
          exportParameters.setStepId(Step.ROOT_STEP.id());
  
          // Then
          assertFalse("The OptimizedExportStrategy should not be acceptable if version is ROOT_STEP",
                  optimizedExportStrategy.test(exportParameters));
      }
test_case.class_method_signature: OptimizedExportStrategyTest.testAcceptKO_stepIdIsRootStep()
test_case.full_signature: @Test public void testAcceptKO_stepIdIsRootStep()
test_case.identifier: testAcceptKO_stepIdIsRootStep
test_case.invocations: createEmptyPreparationFromDataset applyAction applyAction getPreparation getSteps remove putTransformationAndMetadataInCacheForSteps setPreparationId setDatasetId setExportType setFrom setStepId id assertFalse test
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAcceptKO_stepIdIsRootStep()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(OptimizedExportStrategy.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(OptimizedExportStrategy.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.file: dataprep-transformation/src/main/java/org/talend/dataprep/transformation/service/export/OptimizedExportStrategy.java
focal_class.identifier: OptimizedExportStrategy
focal_class.class_method_signature: OptimizedExportStrategy.test(ExportParameters parameters)
focal_class.full_signature: @Override public boolean test(ExportParameters parameters)
focal_class.identifier: test
focal_class.modifiers: @Override public
focal_class.parameters: (ExportParameters parameters)
focal_class.return: boolean
focal_class.signature: boolean test(ExportParameters parameters)
focal_class.class_method_signature: OptimizedExportStrategy.execute(ExportParameters parameters)
focal_class.full_signature: @Override public StreamingResponseBody execute(ExportParameters parameters)
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: (ExportParameters parameters)
focal_class.return: StreamingResponseBody
focal_class.signature: StreamingResponseBody execute(ExportParameters parameters)
focal_class.class_method_signature: OptimizedExportStrategy.performOptimizedTransform(ExportParameters parameters, OutputStream outputStream)
focal_class.full_signature: private void performOptimizedTransform(ExportParameters parameters, OutputStream outputStream)
focal_class.identifier: performOptimizedTransform
focal_class.modifiers: private
focal_class.parameters: (ExportParameters parameters, OutputStream outputStream)
focal_class.return: void
focal_class.signature: void performOptimizedTransform(ExportParameters parameters, OutputStream outputStream)
focal_class.class_method_signature: OptimizedExportStrategy.getMatchingSteps(List<String> steps, String fromId, String toId)
focal_class.full_signature: private List<String> getMatchingSteps(List<String> steps, String fromId, String toId)
focal_class.identifier: getMatchingSteps
focal_class.modifiers: private
focal_class.parameters: (List<String> steps, String fromId, String toId)
focal_class.return: List<String>
focal_class.signature: List<String> getMatchingSteps(List<String> steps, String fromId, String toId)
focal_class.superclass: extends BaseSampleExportStrategy
focal_method.body: @Override
      public boolean test(ExportParameters parameters) {
          if (parameters == null) {
              return false;
          }
          if (parameters.getContent() != null) {
              return false;
          }
          if (StringUtils.isEmpty(parameters.getPreparationId())) {
              return false;
          }
          final OptimizedPreparationInput optimizedPreparationInput = new OptimizedPreparationInput(parameters);
          return optimizedPreparationInput.applicable();
      }
focal_method.class_method_signature: OptimizedExportStrategy.test(ExportParameters parameters)
focal_method.full_signature: @Override public boolean test(ExportParameters parameters)
focal_method.identifier: test
focal_method.invocations: getContent isEmpty getPreparationId applicable
focal_method.modifiers: @Override public
focal_method.parameters: (ExportParameters parameters)
focal_method.return: boolean
focal_method.signature: boolean test(ExportParameters parameters)