### Question:
BatchPluginResource implements DownloadableResource, PluginResource, BatchResource { public String getUrl() { final StringBuilder sb = new StringBuilder(); sb.append(URL_PREFIX).append(PATH_SEPARATOR).append(moduleCompleteKey).append(PATH_SEPARATOR).append(resourceName); addParamsToUrl(sb, params); return sb.toString(); } BatchPluginResource(final String moduleCompleteKey, final String type, final Map<String, String> params); private  BatchPluginResource(final String resourceName, final String moduleCompleteKey, final String type, final Map<String, String> params); boolean isEmpty(); void add(final DownloadableResource resource); boolean isResourceModified(final HttpServletRequest request, final HttpServletResponse response); void serveResource(final HttpServletRequest request, final HttpServletResponse response); void streamResource(final OutputStream out); String getContentType(); static BatchPluginResource parse(String url, final Map<String, String> queryParams); static boolean matches(final String url); String getUrl(); String getResourceName(); Map<String, String> getParams(); String getVersion(WebResourceIntegration integration); String getModuleCompleteKey(); boolean isCacheSupported(); String getType(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testGetUrl() { final BatchPluginResource resource = new BatchPluginResource("test.plugin:webresources", "js", Collections.<String, String>emptyMap()); assertEquals("/download/batch/test.plugin:webresources/test.plugin:webresources.js", resource.getUrl()); }
@Test public void testGetUrlWithParams() { final Map<String, String> params = new TreeMap<String, String>(); params.put("foo", "bar"); params.put("moo", "cow"); final BatchPluginResource resource = new BatchPluginResource("test.plugin:webresources", "js", params); assertEquals("/download/batch/test.plugin:webresources/test.plugin:webresources.js?foo=bar&moo=cow", resource.getUrl()); }