public RequestUrl toRequestUrl(String matchUrl) {
        Map<String, String> params = new HashMap<>();
        Iterator<UrlPathPart> iter1 = new MatchUrl(matchUrl).pathParts.iterator();
        Iterator<UrlPathPart> iter2 = pathParts.iterator();
        while (iter1.hasNext() && iter2.hasNext()) {
            UrlPathPart matchUrlPathPart = iter1.next();
            UrlPathPart actualUrlPathPart = iter2.next();
            if (matchUrlPathPart instanceof UrlParamPathPart) {
                params.put(matchUrlPathPart.part(), actualUrlPathPart.part());
            }
        }
        return new RequestUrl(url, params);
    }
@Test
    void testToRequestUrlWithQueryParams() {
        RequestUrl requestUrl = new MatchUrl("/api/jobs/enqueued?offset=2").toRequestUrl("/api/jobs/:state");
        assertThat(requestUrl.param(":state")).isEqualTo("enqueued");
    }