@Test
    public void testBeanIdMatch() {
        TestCustomizeFilter testCustomizeFilter = new TestCustomizeFilter();
        testCustomizeFilter.setIdRule("AAA,!BBB");
        Assert.assertEquals("AAA,!BBB", testCustomizeFilter.getIdRule());

        AbstractInterfaceConfig configA = new ProviderConfig();
        configA.setInterfaceId(Serializer.class.getName());
        configA.setId("AAA");
        FilterInvoker filterInvokerA = new FilterInvoker(null, null, configA);

        AbstractInterfaceConfig configB = new ProviderConfig();
        configB.setInterfaceId(Serializer.class.getName());
        configB.setId("BBB");
        FilterInvoker filterInvokerB = new FilterInvoker(null, null, configB);

        AbstractInterfaceConfig configC = new ProviderConfig();
        configC.setInterfaceId(Serializer.class.getName());
        configC.setId("CCC");
        FilterInvoker filterInvokerC = new FilterInvoker(null, null, configC);

        Assert.assertEquals(true, testCustomizeFilter.needToLoad(filterInvokerA));
        Assert.assertEquals(false, testCustomizeFilter.needToLoad(filterInvokerB));
        Assert.assertEquals(true, testCustomizeFilter.needToLoad(filterInvokerC));

    }
@author <a href="mailto:lw111072@antfin.com">liangen</a>
core-impl/filter/src/test/java/com/alipay/sofa/rpc/filter/BeanIdMatchFilterTest.java