ParameterizedPathMatcher implements PathMatcher { public String extractPathWithinPattern(String pattern, String path) { return getOrCreatePattern(pattern).extractPathWithinPattern(path); }  boolean isPattern(String string); boolean match(String pattern, String path); boolean matchStart(String pattern, String path); Map<String, String> namedParameters(String pattern, String path); String extractPathWithinPattern(String pattern, String path); Map<String, String> extractUriTemplateVariables(String pattern, String path); Comparator<String> getPatternComparator(String path); String combine(String pattern1, String pattern2);  }
@Test public void testExtractPathWithinPattern() { ParameterizedPathMatcher pathMatcher = new ParameterizedPathMatcher(); assertEquals("", pathMatcher.extractPathWithinPattern("/docs/cvs/commit.html", "/docs/cvs/commit.html")); assertEquals("cvs/commit", pathMatcher.extractPathWithinPattern("/docs*.html", "/docs/cvs/commit.html")); assertEquals("docs/cvs/commit.html", pathMatcher.extractPathWithinPattern("*:x).html", "/docs/cvs/commit.html")); assertEquals("docs/cvs/commit.html", pathMatcher.extractPathWithinPattern("/do(cs*.html:x)", "/docs/cvs/commit.html")); assertEquals("docs/cvs/commit.html", pathMatcher.extractPathWithinPattern("/do(cs*.html", "/docs/cvs/commit.html")); }