@@ -0,0 +1,1539 @@
+package com.alibaba.json.bvt.annotation;%0A%0Aimport java.io.IOException;%0Aimport java.lang.reflect.Type;%0A%0Aimport org.junit.Assert;%0A%0Aimport com.alibaba.fastjson.JSON;%0Aimport com.alibaba.fastjson.JSONObject;%0Aimport com.alibaba.fastjson.serializer.JSONSerializable;%0Aimport com.alibaba.fastjson.serializer.JSONSerializer;%0A%0Aimport junit.framework.TestCase;%0A%0Apublic class CustomSerializerTest_enum extends TestCase %7B%0A%0A    public void test_0() throws Exception %7B%0A        Model model = new Model();%0A        model.id = 1001;%0A        model.orderType = OrderType.PayOrder;%0A        String text = JSON.toJSONString(model);%0A        Assert.assertEquals(%22%7B%5C%22id%5C%22:1001,%5C%22orderType%5C%22:%7B%5C%22remark%5C%22:%5C%22%E6%94%AF%E4%BB%98%E8%AE%A2%E5%8D%95%5C%22,%5C%22value%5C%22:1%7D%7D%22, text);%0A    %7D%0A%0A    public static class Model %7B%0A        public int id;%0A        public OrderType orderType;%0A    %7D%0A%0A    public static enum OrderType implements JSONSerializable %7B%0A                                  PayOrder(1, %22%E6%94%AF%E4%BB%98%E8%AE%A2%E5%8D%95%22), //%0A                                  SettleBill(2, %22%E7%BB%93%E7%AE%97%E5%8D%95%22);%0A%0A        public final int    value;%0A        public final String remark;%0A%0A        private OrderType(int value, String remark)%7B%0A            this.value = value;%0A            this.remark = remark;%0A        %7D%0A%0A        @Override%0A        public void write(JSONSerializer serializer, Object fieldName, Type fieldType,%0A                          int features) throws IOException %7B%0A            JSONObject json = new JSONObject();%0A            json.put(%22value%22, value);%0A            json.put(%22remark%22, remark);%0A            serializer.write(json);%0A        %7D%0A%0A    %7D%0A%0A%7D%0A

add testcase for custom enum serilaize