public boolean match(String pattern, String path) {
        return match(pattern, path, true);
    }
@Test
    public void test() {
        AntPathMatcher matcher = new AntPathMatcher();
        assertTrue(matcher.match("*.txt", "blah.txt"));
        assertFalse(matcher.match("*.txt", "foo/blah.txt"));
        assertTrue(matcher.match("???.txt", "abc.txt"));
        assertTrue(matcher.match("abc.t?t", "abc.tnt"));
        assertFalse(matcher.match("???.txt", "abcd.txt"));
        assertTrue(matcher.match("**/*.txt", "blah.txt"));
        assertTrue(matcher.match("**/*.txt", "foo/blah.txt"));
        assertTrue(matcher.match("**/*.txt", "foo/bar/blah.txt"));
        assertTrue(matcher.match("foo/**/*.txt", "foo/bar/blah.txt"));
        assertTrue(matcher.match("foo/**/*.??", "foo/bar/blah.gz"));
        assertTrue(matcher.match("foo/**/*.txt", "foo/blah.txt"));
        assertFalse(matcher.match("foo/**/*.txt", "blah/blah.txt"));
    }