### Question:
VertxExecutor implements Executor { @Override public void execute(Runnable command) { vertx.runOnContext(aVoid -> command.run()); } @Inject  VertxExecutor(Vertx vertx); @Override void execute(Runnable command);  }### Answer:
@Test public void testExecute() throws Exception { executor.execute(command); verify(vertx).runOnContext(handlerCaptor.capture()); handlerCaptor.getValue().handle(null); verify(command).run(); }