@Test void callbackShouldBeCalled() throws Throwable { Retry retry = new NoRetry(); Client client = mock(Client.class); retry.execute("test", mock(Request.class), (client::request)); verify(client, times(1)).request(any(Request.class)); }
@Override public Response execute( String methodName, Request request, Function<Request, Response> callback) { return callback.apply(request); }
NoRetry implements Retry { @Override public Response execute( String methodName, Request request, Function<Request, Response> callback) { return callback.apply(request); } }
NoRetry implements Retry { @Override public Response execute( String methodName, Request request, Function<Request, Response> callback) { return callback.apply(request); }  }
NoRetry implements Retry { @Override public Response execute( String methodName, Request request, Function<Request, Response> callback) { return callback.apply(request); }  @Override Response execute(
      String methodName, Request request, Function<Request, Response> callback); }
NoRetry implements Retry { @Override public Response execute( String methodName, Request request, Function<Request, Response> callback) { return callback.apply(request); }  @Override Response execute(
      String methodName, Request request, Function<Request, Response> callback);  }