@Test
@SneakyThrows
public void testConsumeThrowsException() {

    when(bufferedReaderMock.readLine())
            .thenReturn("aaa")
            .thenThrow(new IOException());
    final Flux<String> result = bufferedReaderAdapter.consume().apply(bufferedReaderMock);
    StepVerifier.create(result)
            .consumeNextWith(a -> assertThat(a, is("aaa")))
            .verifyError();
}