### Question:
JavascriptWebResource extends AbstractWebResourceFormatter { public String formatResource(String url, Map<String, String> params) { StringBuffer buffer = new StringBuffer("<script type=\"text/javascript\" "); buffer.append("src=\"").append(url).append("\" "); buffer.append(StringUtils.join(getParametersAsAttributes(params).iterator(), " ")); buffer.append("></script>\n"); return buffer.toString(); }  boolean matches(String name); String formatResource(String url, Map<String, String> params);  }### Answer:
@Test public void testFormatResource() { final String url = "/confluence/download/resources/confluence.web.resources:ajs/atlassian.js"; assertEquals("<script type=\"text/javascript\" src=\"" + url + "\" ></script>\n", javascriptWebResource.formatResource(url, new HashMap<String, String>())); }