public class StringMatcherUnitTest {
@Test
public void testMatchCasesWithExcludeRules() throws Exception {
StringMatcher m = new StringMatcher(null,
Arrays.asList("aaa", "bbb", "~cc.*cc", "~ddd"));
assertFalse(m.matches("aaa"));
assertTrue(m.matches("aa"));
assertFalse(m.matches("bbb"));
assertTrue(m.matches("ccaac"));
assertFalse(m.matches("ccaacc"));
assertFalse(m.matches("ddd"));
}