@@ -0,0 +1,2012 @@
+package com.alibaba.json.bvt.bug;%0A%0Aimport java.util.Date;%0A%0Aimport org.junit.Assert;%0A%0Aimport com.alibaba.fastjson.JSON;%0A%0Aimport junit.framework.TestCase;%0A%0Apublic class Bug_for_issue_336 extends TestCase %7B%0A%0A    public void test_for_issue() throws Exception %7B%0A        RemoteInvocation remoteInvocation = new RemoteInvocation();%0A        remoteInvocation.setMethodName(%22test%22);%0A        remoteInvocation.setParameterTypes(new Class%5B%5D %7B int.class, Date.class, String.class %7D);%0A        remoteInvocation.setArguments(new Object%5B%5D %7B 1, new Date(1460538273131L), %22this is a test%22 %7D);%0A        String json = JSON.toJSONString(remoteInvocation);%0A        %0A        Assert.assertEquals(%22%7B%5C%22arguments%5C%22:%5B1,1460538273131,%5C%22this is a test%5C%22%5D,%5C%22methodName%5C%22:%5C%22test%5C%22,%5C%22parameterTypes%5C%22:%5B%5C%22int%5C%22,%5C%22java.util.Date%5C%22,%5C%22java.lang.String%5C%22%5D%7D%22, json);%0A        %0A        remoteInvocation = JSON.parseObject(json, RemoteInvocation.class);%0A        %0A        Assert.assertEquals(3, remoteInvocation.parameterTypes.length);%0A        Assert.assertEquals(int.class, remoteInvocation.parameterTypes%5B0%5D);%0A        Assert.assertEquals(Date.class, remoteInvocation.parameterTypes%5B1%5D);%0A        Assert.assertEquals(String.class, remoteInvocation.parameterTypes%5B2%5D);%0A        %0A%0A    %7D%0A%0A    public static class RemoteInvocation %7B%0A%0A        private String     methodName;%0A        private Class%3C?%3E%5B%5D parameterTypes;%0A        private Object%5B%5D   arguments;%0A%0A        public String getMethodName() %7B%0A            return methodName;%0A        %7D%0A%0A        public void setMethodName(String methodName) %7B%0A            this.methodName = methodName;%0A        %7D%0A%0A        public Class%3C?%3E%5B%5D getParameterTypes() %7B%0A            return parameterTypes;%0A        %7D%0A%0A        public void setParameterTypes(Class%3C?%3E%5B%5D parameterTypes) %7B%0A            this.parameterTypes = parameterTypes;%0A        %7D%0A%0A        public Object%5B%5D getArguments() %7B%0A            return arguments;%0A        %7D%0A%0A        public void setArguments(Object%5B%5D arguments) %7B%0A            this.arguments = arguments;%0A        %7D%0A%0A    %7D%0A%7D%0A

add testcase for issue 336. https://github.com/alibaba/fastjson/issues/336