@@ -0,0 +1,2303 @@
+/**%0A * Copyright (C) 2009-2015 the original author or authors.%0A * See the notice.md file distributed with this work for additional%0A * information regarding copyright ownership.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.fusesource.restygwt.client.codec;%0A%0Aimport org.fusesource.restygwt.client.JsonEncoderDecoder;%0A%0Aimport com.fasterxml.jackson.annotation.JsonSubTypes;%0Aimport com.fasterxml.jackson.annotation.JsonSubTypes.Type;%0Aimport com.fasterxml.jackson.annotation.JsonTypeInfo;%0Aimport com.fasterxml.jackson.annotation.JsonTypeName;%0Aimport com.google.gwt.core.client.GWT;%0Aimport com.google.gwt.junit.client.GWTTestCase;%0A%0Apublic class PolymorphicEncoderDecoderTestGwt extends GWTTestCase %7B%0A%0A    @Override%0A    public String getModuleName() %7B%0A        return %22org.fusesource.restygwt.EncoderDecoderTestGwt%22;%0A    %7D%0A%0A    @JsonSubTypes(%7B @Type(A.class), @Type(B.class) %7D)%0A    @JsonTypeName(%22A%22)%0A    @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = %22@class%22)%0A    static public class A %7B%0A        private String code;%0A%0A        public String getCode() %7B%0A            return code;%0A        %7D%0A%0A        public void setCode(String code) %7B%0A            this.code = code;%0A        %7D%0A    %7D%0A%0A    @JsonTypeName(%22B%22)%0A    static public class B extends A %7B%0A        private String desc;%0A%0A        public String getDesc() %7B%0A            return desc;%0A        %7D%0A%0A        public void setDesc(String desc) %7B%0A            this.desc = desc;%0A        %7D%0A    %7D%0A%0A    static public interface IdNamePolymorphicCodec extends JsonEncoderDecoder%3CA%3E %7B%0A    %7D%0A%0A    public void testIdNamePolymorphic() %7B%0A        IdNamePolymorphicCodec codec = GWT.create(IdNamePolymorphicCodec.class);%0A%0A        String json = %22%7B%5C%22code%5C%22:%5C%22test code%5C%22%7D%22;%0A%0A        A obj = codec.decode(json);%0A    %7D%0A%0A%7D

Add Test for #249