public void configureServerWithBasicAuth(final Consumer<TestServerBootstrap> serverCustomizer) {
        configureServerWithBasicAuth(
                new BasicTestAuthenticator("test:test", "test realm"),
                serverCustomizer);
    }
Unit tests for automatic client authentication.
httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestClientAuthentication.java