@Test
public void testCommandToStreamingWithHeader() throws Exception {

    GenericCommand<InputStream> command = new CommandHelperTestCommand();
    final ResponseEntity<StreamingResponseBody> responseEntity = CommandHelper.toStreaming(command);
    final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    responseEntity.getBody().writeTo(outputStream);
    assertEquals("test", new String(outputStream.toByteArray()));
    assertEquals(HttpStatus.NO_CONTENT, responseEntity.getStatusCode());
    assertEquals("custom value", responseEntity.getHeaders().get("custom").get(0));
}