### Question:
GraphQLHttpService { public CompletableFuture<?> start() { LOG.info("Starting GraphQL HTTP service on {}:{}", config.getHost(), config.getPort()); httpServer = vertx.createHttpServer( new HttpServerOptions().setHost(config.getHost()).setPort(config.getPort())); final Router router = Router.router(vertx); router.route().handler(checkWhitelistHostHeader()); router .route() .handler( CorsHandler.create(buildCorsRegexFromConfig()) .allowedHeader("*") .allowedHeader("content-type")); router .route() .handler( BodyHandler.create() .setUploadsDirectory(dataDir.resolve("uploads").toString()) .setDeleteUploadedFilesOnEnd(true)); router.route("/").method(GET).method(POST).handler(this::handleEmptyRequestAndRedirect); router .route(GRAPH_QL_ROUTE) .method(GET) .method(POST) .produces(APPLICATION_JSON) .handler( TimeoutHandler.handler( Optional.of(new TimeoutOptions(config.getHttpTimeoutSec())), false)) .handler(this::handleGraphQLRequest); final CompletableFuture<?> resultFuture = new CompletableFuture<>(); httpServer .requestHandler(router) .listen( res -> { if (!res.failed()) { resultFuture.complete(null); LOG.info( "GraphQL HTTP service started and listening on {}:{}", config.getHost(), httpServer.actualPort()); return; } httpServer = null; final Throwable cause = res.cause(); if (cause instanceof SocketException) { resultFuture.completeExceptionally( new GraphQLServiceException( String.format( "Failed to bind Ethereum GraphQL HTTP listener to %s:%s: %s", config.getHost(), config.getPort(), cause.getMessage()))); return; } resultFuture.completeExceptionally(cause); }); return resultFuture; } GraphQLHttpService(
      final Vertx vertx,
      final Path dataDir,
      final GraphQLConfiguration config,
      final GraphQL graphQL,
      final GraphQLDataFetcherContextImpl dataFetcherContext,
      final EthScheduler scheduler); CompletableFuture<?> start(); CompletableFuture<?> stop(); InetSocketAddress socketAddress(); @VisibleForTesting String url();  }### Answer:
@Test public void invalidCallToStart() { service .start() .whenComplete( (unused, exception) -> assertThat(exception).isInstanceOf(IllegalStateException.class)); }