@@ -0,0 +1,1580 @@
+/**%0A * Copyright (c) 2008-2012, http://www.snakeyaml.org%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 */%0Apackage org.yaml.snakeyaml.issues.issue143;%0A%0Aimport junit.framework.TestCase;%0A%0Aimport org.yaml.snakeyaml.DumperOptions;%0Aimport org.yaml.snakeyaml.Yaml;%0A%0Apublic class GenericMapTest extends TestCase %7B%0A%0A    public void testMap() throws Exception %7B%0A        BeanWithMap fact = new BeanWithMap();%0A        GenericMap%3CInteger%3E shash = fact.getMap();%0A        shash.put(%22toto%22, new Integer(10));%0A        DumperOptions options = new DumperOptions();%0A        options.setAllowReadOnlyProperties(true);%0A        Yaml yaml = new Yaml(options);%0A        String txt = yaml.dump(fact);%0A        assertTrue(txt.contains(%22org.yaml.snakeyaml.issues.issue143.GenericMapTest%22));%0A    %7D%0A%0A    public static class GenericMap%3CT%3E extends java.util.HashMap%3CString, T%3E %7B%0A        private static final long serialVersionUID = -6833859369398863926L;%0A    %7D%0A%0A    public class BeanWithMap %7B%0A        public GenericMap%3CInteger%3E getMap() %7B%0A            return new GenericMap%3CInteger%3E();%0A        %7D%0A    %7D%0A%7D

Add a test for issue 143