test_class.declarator: cache
test_class.modifier: @Autowired
test_class.original_string: @Autowired
      ContentCache cache;
test_class.type: ContentCache
test_class.var_name: cache
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.declarator: cachedExportStrategy
test_class.modifier: @Autowired
test_class.original_string: @Autowired
      CachedExportStrategy cachedExportStrategy;
test_class.type: CachedExportStrategy
test_class.var_name: cachedExportStrategy
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.file: dataprep-transformation/src/test/java/org/talend/dataprep/transformation/service/export/CachedExportStrategyTest.java
test_class.identifier: CachedExportStrategyTest
test_class.superclass: extends ServiceBaseTest
test_case.body: @Test
      public void shouldNotAcceptWhenParameterContentIsPresent() throws Exception {
          // Then
          final ExportParameters parameters = new ExportParameters();
          parameters.setContent(new DataSet());
          assertFalse(cachedExportStrategy.test(parameters));
      }
test_case.class_method_signature: CachedExportStrategyTest.shouldNotAcceptWhenParameterContentIsPresent()
test_case.full_signature: @Test public void shouldNotAcceptWhenParameterContentIsPresent()
test_case.identifier: shouldNotAcceptWhenParameterContentIsPresent
test_case.invocations: setContent assertFalse test
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldNotAcceptWhenParameterContentIsPresent()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(CachedExportStrategy.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(CachedExportStrategy.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/CachedExportStrategy.java
focal_class.identifier: CachedExportStrategy
focal_class.class_method_signature: CachedExportStrategy.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: CachedExportStrategy.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: CachedExportStrategy.getCacheKey(ExportParameters parameters)
focal_class.full_signature: private TransformationCacheKey getCacheKey(ExportParameters parameters)
focal_class.identifier: getCacheKey
focal_class.modifiers: private
focal_class.parameters: (ExportParameters parameters)
focal_class.return: TransformationCacheKey
focal_class.signature: TransformationCacheKey getCacheKey(ExportParameters parameters)
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;
          }
          try {
              final TransformationCacheKey contentKey = getCacheKey(parameters);
              return contentCache.has(contentKey);
          } catch (TDPException e) {
              LOGGER.debug("Unable to use cached export strategy.", e);
              return false;
          }
      }
focal_method.class_method_signature: CachedExportStrategy.test(ExportParameters parameters)
focal_method.full_signature: @Override public boolean test(ExportParameters parameters)
focal_method.identifier: test
focal_method.invocations: getContent isEmpty getPreparationId getCacheKey has debug
focal_method.modifiers: @Override public
focal_method.parameters: (ExportParameters parameters)
focal_method.return: boolean
focal_method.signature: boolean test(ExportParameters parameters)