public void stop() {
        try {
            this.worker.stop();
            this.workerThread.join();
            ALL_PORTS.remove(getPort());
        } catch (final InterruptedException e) {
            LoggingUtils.error(LOGGER, e);
        }
    }
Stops the Web server after processing any pending requests.
core/cas-server-core-util-api/src/test/java/org/apereo/cas/util/MockWebServer.java