WildcardPattern pattern = new WildcardPattern("foo*");
Pair<Boolean, String> result = pattern.match("foobar");
assertTrue(result.getV1());
assertEquals("bar", result.getV2());
result = pattern.match("fobar");
assertFalse(result.getV1());
assertNull(result.getV2());
result = pattern.match("foo");
assertTrue(result.getV1());