public OptionalInt listenPort() {
        return testDriver != null ? OptionalInt.of(testDriver.server().getListenPort()) : OptionalInt.empty();
    }
Test driver for {@link RestApi}

@author bjorncs
container-core/src/main/java/com/yahoo/restapi/RestApiTestDriver.java