public DiscFilterRequest build() {
            var httpReq = HttpRequest.newServerRequest(
                    new DummyContainer(clock), uri, method, version, remoteAddress, clock.millis(), clock.millis());
            var filterReq = new DiscFilterRequest(httpReq);
            filterReq.setUserPrincipal(principal);
            filterReq.setAttribute(CONTEXT_KEY_ACCESS_LOG_ENTRY, accessLogEntry != null ? accessLogEntry : new AccessLogEntry());
            attributes.forEach(filterReq::setAttribute);
            filterReq.setAttribute(RequestUtils.JDISC_REQUEST_X509CERT, certificates.toArray(X509Certificate[]::new));
            headers.forEach(filterReq::addHeader);
            filterReq.setCookies(cookies);
            return filterReq;
        }
Test helper for {@link SecurityRequestFilter}/{@link SecurityResponseFilter}.

@author bjorncs
container-core/src/main/java/com/yahoo/jdisc/http/filter/util/FilterTestUtils.java