public void testPatterns() throws Exception {
Filter filter = Filters.patterns("org\\.foo\\..*", ".*\\.Blue");
assertTrue(filter.accept("org.foo.Red"));
assertTrue(filter.accept("org.foo.Blue"));
assertTrue(filter.accept("org.bar.Blue"));
assertFalse(filter.accept("com.foo.Orange"));
assertFalse(filter.accept("net.foo.Redd"));
assertFalse(filter.accept(""));