@Test public void shouldAuthenticateClient() throws Exception { Client client = mock(Client.class); RoutingContext context = mock(RoutingContext.class); CountDownLatch latch = new CountDownLatch(1); authProvider.handle(client, context, clientAsyncResult -> { latch.countDown(); Assert.assertNotNull(clientAsyncResult); Assert.assertNotNull(clientAsyncResult.result()); }); assertTrue(latch.await(10, TimeUnit.SECONDS)); }
@Override public void handle(Client client, RoutingContext context, Handler<AsyncResult<Client>> handler) { handler.handle(Future.succeededFuture(client)); }
ClientNoneAuthProvider implements ClientAuthProvider { @Override public void handle(Client client, RoutingContext context, Handler<AsyncResult<Client>> handler) { handler.handle(Future.succeededFuture(client)); } }
ClientNoneAuthProvider implements ClientAuthProvider { @Override public void handle(Client client, RoutingContext context, Handler<AsyncResult<Client>> handler) { handler.handle(Future.succeededFuture(client)); }  }
ClientNoneAuthProvider implements ClientAuthProvider { @Override public void handle(Client client, RoutingContext context, Handler<AsyncResult<Client>> handler) { handler.handle(Future.succeededFuture(client)); }  @Override boolean canHandle(Client client, RoutingContext context); @Override void handle(Client client, RoutingContext context, Handler<AsyncResult<Client>> handler); }
ClientNoneAuthProvider implements ClientAuthProvider { @Override public void handle(Client client, RoutingContext context, Handler<AsyncResult<Client>> handler) { handler.handle(Future.succeededFuture(client)); }  @Override boolean canHandle(Client client, RoutingContext context); @Override void handle(Client client, RoutingContext context, Handler<AsyncResult<Client>> handler);  }