AntPathMatcher { public static boolean includes(final Collection<String> patterns, final Path path) { checkNotNull(PATTERNS, patterns); checkNotNull("path", path); return matches(patterns, path); }  static boolean filter(final Collection<String> includes,
                                 final Collection<String> excludes,
                                 final Path path); static boolean filter(final Collection<String> includes,
                                 final Collection<String> excludes,
                                 final URI uri); static boolean includes(final Collection<String> patterns,
                                   final Path path); static boolean includes(final Collection<String> patterns,
                                   final URI uri); static boolean excludes(final Collection<String> patterns,
                                   final URI uri); static boolean excludes(final Collection<String> patterns,
                                   final Path path);  }
@Test public void testIncludes() { final Collection<String> patterns = new ArrayList<String>() {{ add("git:/repo/**"); }}; { final Path path = Paths.get(URI.create("file: Assert.assertFalse(includes(patterns, path)); } { final Path path = Paths.get(URI.create("git: Assert.assertTrue(includes(patterns, path)); } { final Path path = Paths.get(URI.create("git: Assert.assertTrue(includes(patterns, path)); } }
@Test public void testIncludesMid() { final Collection<String> patterns = new ArrayList<String>() {{ add("default:/repo/**"); }}; { final Path path = Paths.get(URI.create("file: Assert.assertTrue(includes(patterns, path)); } { final Path path = Paths.get(URI.create("git: Assert.assertFalse(includes(patterns, path)); } { final Path path = Paths.get(URI.create("git: Assert.assertTrue(includes(patterns, path)); } }
@Test public void testIncludesUri() { final Collection<String> patterns = new ArrayList<String>() {{ add("git:/repo/**"); }}; Assert.assertFalse(includes(patterns, URI.create("file: Assert.assertTrue(includes(patterns, URI.create("git: Assert.assertTrue(includes(patterns, URI.create("git: }
@Test public void testIncludesMidUri() { final Collection<String> patterns = new ArrayList<String>() {{ add("file:/repo/**"); }}; Assert.assertTrue(includes(patterns, URI.create("file: Assert.assertFalse(includes(patterns, URI.create("git: Assert.assertTrue(includes(patterns, URI.create("git: }