assertEquals(174, bean.getId());
assertEquals(map, bean.getMap());
}
public void testLoadEnumBean2() {
Constructor c = new Constructor();
TypeDescription td = new TypeDescription(EnumBean.class);
td.putMapPropertyType("map", Suit.class, Object.class);
c.addTypeDescription(td);
Yaml yaml = new Yaml(c);
EnumBean bean = (EnumBean) yaml
.load("!!org.yaml.snakeyaml.EnumBean\nid: 174\nmap:\n CLUBS: 1\n DIAMONDS: 2\nsuit: CLUBS");
LinkedHashMap<Suit, Integer> map = new LinkedHashMap<Suit, Integer>();