Pattern { public boolean match(String value) { if (value == null) { return false; } String cleanValue = plateformIndependant(value); if (antPathMatcher.isPattern(pattern)) { return antPathMatcher.match(pattern.toLowerCase(), cleanValue.toLowerCase()); } else { return cleanValue.toLowerCase().equalsIgnoreCase(pattern.toLowerCase()); } } Pattern();  Pattern(String pattern, boolean include); String getPattern(); boolean isInclude(); AntPathMatcher getAntPathMatcher(); boolean match(String value); boolean isExcluded(); boolean isIncluded(); static boolean hasPattern(List<Pattern> patterns, String value);  }
@Test public void goodUsage() { Pattern p = new Pattern("**/support/*", true); Assert.assertTrue(p.match("support/toto")); Assert.assertTrue(p.match("src/main/resource/support/toto")); }
@Test public void badUsage() { Pattern p = new Pattern("**/support/*", true); Assert.assertFalse(p.match("support")); Assert.assertFalse(p.match("ddd")); }