public int getPort() {
        if (port == -1) {
            throw new IllegalStateException("Server has not been started yet");
        }
        return port;
    }
This test server accepts a single TLS connection request, which will then time out. The server can run in two modes.
If {@code sendServerHello} is false, the Client Hello message will be swallowed, and the client will time out while
waiting for the Server Hello record. Else, the server will respond to the Client Hello with a Server Hello, and the
client's connection attempt will subsequently time out while waiting for the Change Cipher Spec record from the
server.
httpclient5-testing/src/test/java/org/apache/hc/client5/testing/tls/TlsHandshakeTimeoutServer.java