### Question:
PathResolver { public Pattern findPathPattern(Collection<Pattern> pathPatterns, String requestPath) { if (requestPath == null || requestPath.isEmpty()) { requestPath = "/"; } for (Pattern pathPattern : pathPatterns) { Matcher matcher = pathPattern.matcher(requestPath); if (matcher.matches()) { return pathPattern; } } return null; } 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 findPathPattern() { List<Pattern> patternList = new ArrayList<>(); patternList.add(Pattern.compile("/")); assertEquals("/", PathResolver.instance().findPathPattern(patternList, null).pattern()); assertEquals("/", PathResolver.instance().findPathPattern(patternList, "").pattern()); }