@Override
    public void start(Future<Void> startFuture)  {
        int port = NumberUtils.toInt(System.getProperty("io.apiman.test.common.echo.port"), 9998);
        HttpServerOptions httpServerOptions = getHttpServerOptions();
        HttpServerOptions httpsServerOptions = getHttpsServerOptions()
                .setSsl(true)
                .setKeyStoreOptions(getKeystore())
                .setTrustStoreOptions(getTrustStore());

        // Plain HTTP server
        vertx.createHttpServer(httpServerOptions)
            .requestHandler(new EchoHandler())
            .listen(port, result -> {
                if (result.succeeded()) {
                    checkSuccess(startFuture, result);
                } else {
                    startFuture.fail(result.cause());
                }
            });
        // HTTPS server
        vertx.createHttpServer(httpsServerOptions)
            .requestHandler(new EchoHandler())
            .listen(port+1, result -> {
                if (result.succeeded()) {
                    checkSuccess(startFuture, result);
                } else {
                    startFuture.fail(result.cause());
                }
            });

        log.info("*** Starting EchoServerVertx on HTTP: {0} HTTPS: {1}", port, port+1);
    }
<p>
Vert.x edition of Echo servlet, with view to being more amenable
to performance testing.
</p>
<p>
Can be run directly with: <tt>vertx run EchoServerVertx.java</tt>
</p>
<p>
To set port, use the property -Dio.apiman.test.common.echo.port=1234
</p>

@author Marc Savy {@literal <marc@rhymewithgravy.com>}
test/common/src/main/java/io/apiman/test/common/echo/EchoServerVertx.java