BeanIdMatchFilter extends Filter { protected boolean isMatch(String invokerId) { if (allEffective) { return true; } else { if (excludeId.size() == 0) { return effectiveId.contains(invokerId); } else { return !excludeId.contains(invokerId); } } }  @Override boolean needToLoad(FilterInvoker invoker); String getIdRule(); void setIdRule(String idRule);  }
@Test public void testIsMatch() { TestCustomizeFilter testCustomizeFilter = new TestCustomizeFilter(); Assert.assertTrue(testCustomizeFilter.isMatch("")); testCustomizeFilter = new TestCustomizeFilter(); testCustomizeFilter.setIdRule("AAA,BBB"); AbstractInterfaceConfig configA = new ProviderConfig(); configA.setInterfaceId(Serializer.class.getName()); configA.setId("AAA"); FilterInvoker filterInvokerA = new FilterInvoker(null, null, configA); Assert.assertEquals(true, testCustomizeFilter.needToLoad(filterInvokerA)); }