### Question:
ResourceUrlParser { public PluginResource parse(String resourceUrl) { if (!matches(resourceUrl)) return null; int indexOfStrategyPrefix = resourceUrl.indexOf(strategyPrefix); String libraryAndResource = resourceUrl.substring(indexOfStrategyPrefix + strategyPrefix.length() + 1); String[] parts = libraryAndResource.split("/", 2); if (parts.length != 2) return null; return new PluginResource(parts[0], parts[1]); } ResourceUrlParser(String strategyPrefix); PluginResource parse(String resourceUrl); boolean matches(String resourceUrl);  }### Answer:
@Test public void testParseResourceWithSimpleName() { PluginResource resource = parser.parse("/download/resources/test.plugin.key:module/mydownload.jpg"); assertEquals("test.plugin.key:module", resource.getModuleCompleteKey()); assertEquals("mydownload.jpg", resource.getResourceName()); }
@Test public void testParseResourceWithSlashesInName() { PluginResource resource = parser.parse("/download/resources/test.plugin.key:module/path/to/mydownload.jpg"); assertEquals("test.plugin.key:module", resource.getModuleCompleteKey()); assertEquals("path/to/mydownload.jpg", resource.getResourceName()); }