### Question:
WildcardUtils { @Nullable public static LinearRange rangeOfMatch(String pattern, String str) { List<LinearRange> literalRanges = getLiteralRanges(pattern); int first = -1; int pos = 0; for (LinearRange literalRange: literalRanges) { String literal = pattern.substring(literalRange.getFrom(), literalRange.getTo()); int index = indexOf(str, literal, pos); if (index != -1) { if (first == -1) first = index; pos = index+literal.length(); } else { return null; } } return new LinearRange(first, pos); }  static boolean matchPath(String pattern, String path); static boolean matchString(String pattern, String str); static List<LinearRange> getLiteralRanges(String pattern); @Nullable static PatternApplied applyPattern(String pattern, String str, boolean caseSensitive); @Nullable static LinearRange rangeOfMatch(String pattern, String str);  }### Answer:
@Test public void testRangeOfMatch() { assertEquals("1-3", rangeOfMatch("el", "hello").toString()); assertEquals(null, rangeOfMatch("tu", "hello")); assertEquals("3-8", rangeOfMatch("lo*wo", "hello world").toString()); assertEquals("3-9", rangeOfMatch("lo*w?r", "hello world").toString()); assertEquals("12-37", rangeOfMatch("this*my*program", "hello world this is my first program").toString()); }