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.file: dataprep-backend-service/src/test/java/org/talend/dataprep/command/CommandHelperTest.java
test_class.identifier: CommandHelperTest
test_case.body: @Test
      public void testCommandToAsync() throws Exception {
          GenericCommand<InputStream> command = new CommandHelperTestCommand();
  
          final ResponseEntity<?> responseEntity = CommandHelper.async(command);
          assertEquals(HttpStatus.NO_CONTENT, responseEntity.getStatusCode());
      }
test_case.class_method_signature: CommandHelperTest.testCommandToAsync()
test_case.full_signature: @Test public void testCommandToAsync()
test_case.identifier: testCommandToAsync
test_case.invocations: async assertEquals getStatusCode
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCommandToAsync()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(CommandHelper.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(CommandHelper.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.file: dataprep-backend-service/src/main/java/org/talend/dataprep/command/CommandHelper.java
focal_class.identifier: CommandHelper
focal_class.class_method_signature: CommandHelper.CommandHelper()
focal_class.full_signature: private  CommandHelper()
focal_class.identifier: CommandHelper
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  CommandHelper()
focal_class.class_method_signature: CommandHelper.toStreaming(final HystrixCommand<InputStream> command)
focal_class.full_signature: public static StreamingResponseBody toStreaming(final HystrixCommand<InputStream> command)
focal_class.identifier: toStreaming
focal_class.modifiers: public static
focal_class.parameters: (final HystrixCommand<InputStream> command)
focal_class.return: StreamingResponseBody
focal_class.signature: StreamingResponseBody toStreaming(final HystrixCommand<InputStream> command)
focal_class.class_method_signature: CommandHelper.async(final GenericCommand<?> command)
focal_class.full_signature: public static ResponseEntity<Void> async(final GenericCommand<?> command)
focal_class.identifier: async
focal_class.modifiers: public static
focal_class.parameters: (final GenericCommand<?> command)
focal_class.return: ResponseEntity<Void>
focal_class.signature: ResponseEntity<Void> async(final GenericCommand<?> command)
focal_class.class_method_signature: CommandHelper.toStreaming(final GenericCommand<InputStream> command)
focal_class.full_signature: public static ResponseEntity<StreamingResponseBody> toStreaming(final GenericCommand<InputStream> command)
focal_class.identifier: toStreaming
focal_class.modifiers: public static
focal_class.parameters: (final GenericCommand<InputStream> command)
focal_class.return: ResponseEntity<StreamingResponseBody>
focal_class.signature: ResponseEntity<StreamingResponseBody> toStreaming(final GenericCommand<InputStream> command)
focal_class.class_method_signature: CommandHelper.toPublisher(final Class<T> clazz, final ObjectMapper mapper,
              final HystrixCommand<InputStream> command)
focal_class.full_signature: public static Publisher<T> toPublisher(final Class<T> clazz, final ObjectMapper mapper,
              final HystrixCommand<InputStream> command)
focal_class.identifier: toPublisher
focal_class.modifiers: public static
focal_class.parameters: (final Class<T> clazz, final ObjectMapper mapper,
              final HystrixCommand<InputStream> command)
focal_class.return: Publisher<T>
focal_class.signature: Publisher<T> toPublisher(final Class<T> clazz, final ObjectMapper mapper,
              final HystrixCommand<InputStream> command)
focal_class.class_method_signature: CommandHelper.toStream(Class<T> clazz, ObjectMapper mapper, HystrixCommand<InputStream> command)
focal_class.full_signature: public static Stream<T> toStream(Class<T> clazz, ObjectMapper mapper, HystrixCommand<InputStream> command)
focal_class.identifier: toStream
focal_class.modifiers: public static
focal_class.parameters: (Class<T> clazz, ObjectMapper mapper, HystrixCommand<InputStream> command)
focal_class.return: Stream<T>
focal_class.signature: Stream<T> toStream(Class<T> clazz, ObjectMapper mapper, HystrixCommand<InputStream> command)
focal_method.body: public static ResponseEntity<Void> async(final GenericCommand<?> command) {
          final Observable<?> stream = command.toObservable();
          return stream.map(is -> {
              // copy all headers from the command response so that the mime-type is correctly forwarded. Command has
              // the correct headers due to call to toBlocking() below.
              final MultiValueMap<String, String> headers = new HttpHeaders();
              HttpStatus status = command.getStatus();
              for (Header header : command.getCommandResponseHeaders()) {
                  headers.put(header.getName(), Collections.singletonList(header.getValue()));
              }
              return new ResponseEntity<Void>(null, headers, status);
          }).toBlocking().first();
      }
focal_method.class_method_signature: CommandHelper.async(final GenericCommand<?> command)
focal_method.full_signature: public static ResponseEntity<Void> async(final GenericCommand<?> command)
focal_method.identifier: async
focal_method.invocations: toObservable first toBlocking map getStatus getCommandResponseHeaders put getName singletonList getValue
focal_method.modifiers: public static
focal_method.parameters: (final GenericCommand<?> command)
focal_method.return: ResponseEntity<Void>
focal_method.signature: ResponseEntity<Void> async(final GenericCommand<?> command)