public boolean matches(String matchUrl) {
        if (url.equals(matchUrl)) return true;

        Iterator<UrlPathPart> iter1 = new MatchUrl(matchUrl).pathParts.iterator();
        Iterator<UrlPathPart> iter2 = pathParts.iterator();
        while (iter1.hasNext() && iter2.hasNext())
            if (!iter1.next().matches(iter2.next())) return false;

        return !iter1.hasNext() && !iter2.hasNext();
    }
@Test
    void testNoMatchWithParamsAndDifferentSize() {
        boolean matches = new MatchUrl("/api/jobs/enqueued/test").matches("/api/jobs/:state/test/extra");
        assertThat(matches).isFalse();
    }