@Test
public void testMalformedToPublisher() throws Exception {

    // Given
    HystrixCommand<InputStream> command = new MalformedInputStreamTestCommand();
    final Publisher<CommandHelperTestData> publisher =
            CommandHelper.toPublisher(CommandHelperTestData.class, mapper, command);
    final List<CommandHelperTestData> receivedData = new ArrayList<>();
    // When
    try {
        Flux.from(publisher).subscribe(receivedData::add);
        fail();
    } catch (Exception e) {
        assertTrue(receivedData.isEmpty());
    }
}