### Question:
PathResolver { public String getResolvedPath(OAIContext context, String url) { try { if (isAbsoluteUrl(url)) { Matcher m = PATH_URL_PATTERN.matcher(url); return m.find() ? m.group(3) : "/"; } else { URL resource = context.getBaseUrl(); String basePath = StringUtil.tokenize(resource.toString(), "(?:\\?.*|#.*)", false, true).get(0); String host = resource.getHost(); if (host.length() > 0 && basePath.endsWith(host)) { return "/"; } String lastFragment = basePath.substring(basePath.lastIndexOf('/') + 1); if (lastFragment.contains(".")) { basePath = basePath.substring(0, basePath.indexOf(lastFragment)); } return new URL(new URL(basePath), url).getPath(); } } catch (MalformedURLException e) { return "/"; } } private  PathResolver(); static PathResolver instance(); Pattern solve(String templatePath); Pattern solve(String templatePath, Set<Options> options); String getResolvedPath(OAIContext context, String url); List<Pattern> buildPathPatterns(OAIContext context, List<Server> servers, String templatePath); Pattern findPathPattern(Collection<Pattern> pathPatterns, String requestPath);  }### Answer:
@Test public void getResolvedPath() throws Exception { OAIContext context = new OAI3Context(new URL("http: assertEquals("/348ujup", PathResolver.instance().getResolvedPath(context, "")); context = new OAI3Context(new URL("http: assertEquals("/348ujup", PathResolver.instance().getResolvedPath(context, "")); }