@@ -0,0 +1,1692 @@
+package com.alibaba.json.bvt.serializer.filters;%0A%0Aimport org.junit.Assert;%0A%0Aimport com.alibaba.fastjson.JSON;%0Aimport com.alibaba.fastjson.serializer.BeanContext;%0Aimport com.alibaba.fastjson.serializer.ContextValueFilter;%0Aimport com.alibaba.fastjson.serializer.SerializeConfig;%0Aimport com.alibaba.fastjson.serializer.ValueFilter;%0A%0Aimport junit.framework.TestCase;%0A%0Apublic class ContextValueClassLevelTest extends TestCase %7B%0A%0A    public void test_0() throws Exception %7B%0A        Object%5B%5D array = %7B new ModelA(), new ModelB() %7D;%0A%0A        SerializeConfig config = new SerializeConfig();%0A        config.addFilter(ModelA.class, //%0A                         new ContextValueFilter() %7B%0A%0A                             @Override%0A                             public Object process(BeanContext context, Object object, String name, Object value) %7B%0A                                 return 30001;%0A                             %7D%0A                         %7D);%0A        config.addFilter(ModelB.class, //%0A                         new ContextValueFilter() %7B%0A%0A                             @Override%0A                             public Object process(BeanContext context, Object object, String name, Object value) %7B%0A                                 return 20001;%0A                             %7D%0A                         %7D);%0A        String text2 = JSON.toJSONString(array, config);%0A        Assert.assertEquals(%22%5B%7B%5C%22id%5C%22:30001%7D,%7B%5C%22id%5C%22:20001%7D%5D%22, text2);%0A%0A        String text = JSON.toJSONString(array);%0A        Assert.assertEquals(%22%5B%7B%5C%22id%5C%22:1001%7D,%7B%5C%22id%5C%22:1002%7D%5D%22, text);%0A%0A    %7D%0A%0A    public static class ModelA %7B%0A%0A        public int id = 1001;%0A    %7D%0A%0A    public static class ModelB %7B%0A%0A        public int id = 1002;%0A    %7D%0A%7D%0A

add testcase