in src/main/java/org/apache/sling/testing/resourceresolver/MockResourceResolver.java [133:151]
public String map(final @NotNull HttpServletRequest request, final @NotNull String resourcePath) {
String path = resourcePath;
// split off query string or fragment that may be appendend to the URL
String urlRemainder = null;
int urlRemainderPos = Math.min(path.indexOf('?'), path.indexOf('#'));
if (urlRemainderPos >= 0) {
urlRemainder = path.substring(urlRemainderPos);
path = path.substring(0, urlRemainderPos);
}
// mangle namespaces
if (options.isMangleNamespacePrefixes()) {
path = NamespaceMangler.mangleNamespaces(path);
}
// build full path again
return path + (urlRemainder != null ? urlRemainder : "");
}