@Test
void toFunction() {

    final String tested = UUID.randomUUID()
        .toString();
    final Function<String, String> f = StreamUtil.toFunction(consumer);
    assertThat(f.apply(tested)).isEqualTo(tested);
    verify(consumer).accept(eq(tested));
}