test_class.declarator: service
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private WriterRegistrationService service;
test_class.type: WriterRegistrationService
test_class.var_name: service
test_class.declarator: output = new ByteArrayOutputStream()
test_class.modifier: private
test_class.original_string: private OutputStream output = new ByteArrayOutputStream();
test_class.type: OutputStream
test_class.var_name: output
test_class.file: dataprep-transformation/src/test/java/org/talend/dataprep/transformation/format/WriterRegistrationServiceTest.java
test_class.identifier: WriterRegistrationServiceTest
test_class.superclass: extends BaseFormatTest
test_case.body: @Test
      public void shouldReturnWriterWithParameter() {
          Map<String, String> parameters = new HashMap<>();
          parameters.put(CSVWriterTest.SEPARATOR_PARAM_NAME, "|");
          final TransformerWriter csvWriter = service.getWriter(CSVFormat.CSV, output, parameters);
          Assert.assertTrue(csvWriter instanceof CSVWriter);
      }
test_case.class_method_signature: WriterRegistrationServiceTest.shouldReturnWriterWithParameter()
test_case.full_signature: @Test public void shouldReturnWriterWithParameter()
test_case.identifier: shouldReturnWriterWithParameter
test_case.invocations: put getWriter assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldReturnWriterWithParameter()
focal_class.declarator: context
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ApplicationContext context;
focal_class.type: ApplicationContext
focal_class.var_name: context
focal_class.declarator: formatRegistrationService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private FormatRegistrationService formatRegistrationService;
focal_class.type: FormatRegistrationService
focal_class.var_name: formatRegistrationService
focal_class.file: dataprep-transformation/src/main/java/org/talend/dataprep/transformation/format/WriterRegistrationService.java
focal_class.identifier: WriterRegistrationService
focal_class.class_method_signature: WriterRegistrationService.getWriter(String format, OutputStream output, Map<String, String> parameters)
focal_class.full_signature: public TransformerWriter getWriter(String format, OutputStream output, Map<String, String> parameters)
focal_class.identifier: getWriter
focal_class.modifiers: public
focal_class.parameters: (String format, OutputStream output, Map<String, String> parameters)
focal_class.return: TransformerWriter
focal_class.signature: TransformerWriter getWriter(String format, OutputStream output, Map<String, String> parameters)
focal_method.body: public TransformerWriter getWriter(String format, OutputStream output, Map<String, String> parameters) {
          try {
              // Sanity check -> ensures format is actually enabled before using it.
              final ExportFormat formatByName = formatRegistrationService.getByName(format);
              if (formatByName == null || !formatByName.isEnabled()) {
                  throw new TDPException(UNABLE_TO_USE_EXPORT, ExceptionContext.build().put("format", format));
              }
              if (parameters.isEmpty()) {
                  return (TransformerWriter) context.getBean("writer#" + format, output);
              } else {
                  return (TransformerWriter) context.getBean("writer#" + format, output, parameters);
              }
          } catch (BeansException be) {
              throw new TDPException(TransformationErrorCodes.OUTPUT_TYPE_NOT_SUPPORTED, be);
          }
      }
focal_method.class_method_signature: WriterRegistrationService.getWriter(String format, OutputStream output, Map<String, String> parameters)
focal_method.full_signature: public TransformerWriter getWriter(String format, OutputStream output, Map<String, String> parameters)
focal_method.identifier: getWriter
focal_method.invocations: getByName isEnabled put build isEmpty getBean getBean
focal_method.modifiers: public
focal_method.parameters: (String format, OutputStream output, Map<String, String> parameters)
focal_method.return: TransformerWriter
focal_method.signature: TransformerWriter getWriter(String format, OutputStream output, Map<String, String> parameters)