@Test
void executeFunction() {

    final LoanApi mock = mock(LoanApi.class);
    final Api<LoanApi> api = new Api<>(mock, counter);
    final String expected = UUID.randomUUID()
        .toString();
    final Function<LoanApi, String> function = (a) -> expected;
    final String result = api.call(function);
    assertThat(result).isSameAs(expected);
    assertThat(counter.count()).isEqualTo(1);
}