### Question:
InternalRedirectRenditionDispatcherImpl extends AbstractRenditionDispatcherImpl implements AssetRenditionDispatcher { protected String cleanPathInfoRequestPath(String resourcePath) { if (StringUtils.startsWith(resourcePath, "/")) { return resourcePath; } else if (resourcePath.contains(": log.debug("Resource Path [ {} ] appears to have a scheme, stripping to just the path.", resourcePath); return "/" + StringUtils.substringAfter(StringUtils.substringAfter(resourcePath, ": } else { log.debug("Resource Path [ {} ] appears to be relative, changing to be absolute.", resourcePath); return "/" + resourcePath; } }  @Override String getLabel(); @Override String getName(); @Override Map<String, String> getOptions(); @Override boolean isHidden(); @Override Set<String> getRenditionNames(); @Override List<String> getTypes(); @Override void dispatch(SlingHttpServletRequest request, SlingHttpServletResponse response);  }### Answer:
@Test public void cleanPathInfoRequestPath() { final InternalRedirectRenditionDispatcherImpl assetRenditionDispatcher = new InternalRedirectRenditionDispatcherImpl(); assertEquals("/content/dam/test with spaces.png.test.500.500.png", assetRenditionDispatcher.cleanPathInfoRequestPath("/content/dam/test with spaces.png.test.500.500.png")); assertEquals("/content/dam/test with spaces.png.test.500.500.png", assetRenditionDispatcher.cleanPathInfoRequestPath("content/dam/test with spaces.png.test.500.500.png")); assertEquals("/content/dam/test with spaces.png.test.500.500.png", assetRenditionDispatcher.cleanPathInfoRequestPath("https: assertEquals("/content/dam/test_without_spaces.png.test.500.500.png", assetRenditionDispatcher.cleanPathInfoRequestPath("https: }