WildcardPattern pattern = new WildcardPattern("*");
Pair<Boolean, String> result = pattern.match("foo");
assertTrue(result.getV1());
assertEquals("foo", result.getV2());
result = pattern.match("");
assertTrue(result.getV1());
assertEquals("", result.getV2());
// first occurrence of star takes precedence
pattern = new WildcardPattern("*foo*");