### Question:
UrlPatternParser { public String getMappedUrl(final Object... params) { StringBuffer result = new StringBuffer(); if (params != null) { Matcher matcher = FacesElUtils.elPattern.matcher(originalPattern); Object[] parameters = params; if ((params.length == 1) && (params[0] != null) && (params[0] instanceof List)) { List list = ((List) params[0]); if (list.size() == 0) { parameters = new Object[0]; } else { parameters = list.toArray(params); } } else if ((params.length == 1) && (params[0] == null)) { parameters = new Object[0]; } int i = 0; if (getParameterCount() != parameters.length) { throw new PrettyException("Invalid number of parameters supplied for pattern: " + originalPattern + ", expected <" + getParameterCount() + ">, got <" + parameters.length + ">"); } while (matcher.find()) { matcher.appendReplacement(result, parameters[i].toString()); i++; } matcher.appendTail(result); } else if (getParameterCount() > 0) { throw new PrettyException("Invalid number of parameters supplied: " + originalPattern + ", expected <" + getParameterCount() + ">, got <0>"); } return result.toString(); } 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 testGetMappedUrl() { String mappedUrl = parser.getMappedUrl("p1", 22, 55); assertEquals("/project/p1/22/55", mappedUrl); }