public static BindingMatch<?> getBindingMatch(HttpRequest req, String uriPattern) {
        com.yahoo.jdisc.http.HttpRequest jDiscRequest = req.getJDiscRequest();
        BindingMatch<?> bm = jDiscRequest.getBindingMatch();
        if (bm == null) {
            UriPattern pattern = new UriPattern(uriPattern);
            bm = new BindingMatch<>(
                    pattern.match(URI.create(jDiscRequest.getUri().toString())),
                    new Object(), pattern);
        }
        return bm;
    }
If request is an HTTP request and a jdisc request, return the {@link com.yahoo.jdisc.application.BindingMatch}
of the request. Otherwise return a dummy match useful only for testing based on the <code>uriPattern</code>
supplied.

@param req        an {@link com.yahoo.container.jdisc.HttpRequest}
@param uriPattern a pattern to create a BindingMatch for in tests
@return match
configserver/src/main/java/com/yahoo/vespa/config/server/http/Utils.java