@Test
@SneakyThrows
public void testCloseWhenExceptionThrown() {

    doThrow(new RuntimeException()).when(bufferedReaderMock).close();
    assertThrows(RuntimeException.class,
            () -> bufferedReaderAdapter.close().accept(bufferedReaderMock));
}