### Question:
PluginResourceLocatorImpl implements PluginResourceLocator { String[] splitLastPathPart(final String resourcePath) { int indexOfSlash = resourcePath.lastIndexOf('/'); if (resourcePath.endsWith("/")) { indexOfSlash = resourcePath.lastIndexOf('/', indexOfSlash - 1); } if (indexOfSlash < 0) { return null; } return new String[]{resourcePath.substring(0, indexOfSlash + 1), resourcePath.substring(indexOfSlash + 1)}; } PluginResourceLocatorImpl(final WebResourceIntegration webResourceIntegration, final ServletContextFactory servletContextFactory);  PluginResourceLocatorImpl(final WebResourceIntegration webResourceIntegration, final ServletContextFactory servletContextFactory,
                                     final ResourceBatchingConfiguration resourceBatchingConfiguration); private  PluginResourceLocatorImpl(final WebResourceIntegration webResourceIntegration, final ServletContextFactory servletContextFactory,
                                      final ResourceDependencyResolver dependencyResolver); boolean matches(final String url); DownloadableResource getDownloadableResource(final String url, final Map<String, String> queryParams); List<PluginResource> getPluginResources(final String moduleCompleteKey); String getResourceUrl(final String moduleCompleteKey, final String resourceName); static final String PLUGIN_WEBRESOURCE_BATCHING_OFF; }### Answer:
@Test public void testSplitLastPathPart() { final String[] parts = pluginResourceLocator.splitLastPathPart("http: assertEquals(2, parts.length); assertEquals("http: assertEquals("baz", parts[1]); final String[] anotherParts = pluginResourceLocator.splitLastPathPart(parts[0]); assertEquals(2, anotherParts.length); assertEquals("http: assertEquals("bar/", anotherParts[1]); assertNull(pluginResourceLocator.splitLastPathPart("noslashes")); }