@Test @SneakyThrows public void testCloseWhenNoExceptionThrown() { bufferedReaderAdapter.close().accept(bufferedReaderMock); verify(bufferedReaderMock, only()).close(); }
public Consumer<BufferedReader> close() { return (reader) -> { try { reader.close(); } catch (final IOException e) { throw new FileHandlingException("Error while closing document location!", e); } }; }
BufferedReaderAdapter { public Consumer<BufferedReader> close() { return (reader) -> { try { reader.close(); } catch (final IOException e) { throw new FileHandlingException("Error while closing document location!", e); } }; } }
BufferedReaderAdapter { public Consumer<BufferedReader> close() { return (reader) -> { try { reader.close(); } catch (final IOException e) { throw new FileHandlingException("Error while closing document location!", e); } }; }  }
BufferedReaderAdapter { public Consumer<BufferedReader> close() { return (reader) -> { try { reader.close(); } catch (final IOException e) { throw new FileHandlingException("Error while closing document location!", e); } }; }  Function<BufferedReader, Flux<String>> consume(); Consumer<BufferedReader> close(); }
BufferedReaderAdapter { public Consumer<BufferedReader> close() { return (reader) -> { try { reader.close(); } catch (final IOException e) { throw new FileHandlingException("Error while closing document location!", e); } }; }  Function<BufferedReader, Flux<String>> consume(); Consumer<BufferedReader> close();  }