### Question:
WildcardGlobs { public static boolean isGlobMatched(String globPattern, String targetText) throws InvalidPatternException { List<String> patterns = getGlobsAfterBraceExpansion(globPattern); for (String p : patterns) { if (isNoBraceGlobMatched(p, targetText)) return true; } return false; }  static boolean isGlobMatched(String globPattern, String targetText); static boolean isNoBraceGlobMatched(String globPattern, String target); static List<String> getGlobsAfterBraceExpansion(String pattern); static List<String> getGlobsAfterBraceExpansion(String pattern, boolean allowNumericRanges, PhraseTreatment quoteTreatment, PhraseTreatment parenthesesTreatment);  }### Answer:
@Test public void testBasic() throws InvalidPatternException { assertTrue(WildcardGlobs.isGlobMatched("a?{ex,in}", "akin")); assertTrue(WildcardGlobs.isGlobMatched("a?{ex,in}", "alex")); assertFalse(WildcardGlobs.isGlobMatched("a?{ex,in}", "appin")); }
@Test public void testEmpty() throws InvalidPatternException { assertTrue(WildcardGlobs.isGlobMatched("a{,?}{,b}", "a")); assertTrue(WildcardGlobs.isGlobMatched("a{,?}{,b}", "ab")); assertTrue(WildcardGlobs.isGlobMatched("a{,?}{,b}", "ac")); assertTrue(WildcardGlobs.isGlobMatched("a{,?}{,b}", "acb")); assertFalse(WildcardGlobs.isGlobMatched("a{,?}{,b}", "abc")); assertFalse(WildcardGlobs.isGlobMatched("a{,?}{,b}", "accb")); }