@Test
void executeProcedure() {

    final LoanApi mock = mock(LoanApi.class);
    final Api<LoanApi> api = new Api<>(mock, counter);
    final Consumer<LoanApi> procedure = mock(Consumer.class);
    api.run(procedure);
    verify(procedure, times(1)).accept(eq(mock));
    assertThat(counter.count()).isEqualTo(1);
}