### Question:
UrlPatternParser { public void setUrlPattern(final String urlPattern) { originalPattern = urlPattern; expressions.clear(); Matcher matcher = FacesElUtils.elPattern.matcher(urlPattern); while (matcher.find()) { expressions.add(matcher.group()); } this.urlPattern = matcher.replaceAll("([^/]+)"); } UrlPatternParser(final String pattern); boolean matches(final String url); Map<String, String> getMappedParameters(final String url); String getMappedUrl(final Object... params); void setUrlPattern(final String urlPattern); int getParameterCount();  }### Answer:
@Test public void testSetUrlPattern() { UrlPatternParser parser = new UrlPatternParser( "/project/#{paramsBean.project}/#{paramsBean.project}/#{paramsBean.story}"); assertEquals(3, parser.getParameterCount()); parser.setUrlPattern("/public/home"); assertEquals(0, parser.getParameterCount()); }