String s = yaml.dumpAsMap(listProvider);
// System.out.println(s);
assertEquals("map:\n foo: 17\n bar: 19\n", s);
// parse
Yaml loader = new Yaml();
MapProvider<String, Integer> listProvider2 = loader.loadAs(s, MapProvider.class);
assertEquals(new Integer(17), listProvider2.getMap().get("foo"));
assertEquals(new Integer(19), listProvider2.getMap().get("bar"));
assertEquals(listProvider, listProvider2);
}