### Question:
UrlPatternParser { public Map<String, String> getMappedParameters(final String url) { Map<String, String> result = new HashMap<String, String>(); Matcher matcher = Pattern.compile(urlPattern).matcher(url); if (matcher.matches()) { for (int i = 0; i < expressions.size(); i++) { String el = expressions.get(i); String value = matcher.group(i + 1); result.put(el, value); } } return result; } 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 testGetMappedParameters() { Map<String, String> params = parser.getMappedParameters("/project/starfish1/starfish2/story1"); assertEquals(2, params.size()); }