if (!GenericsBugDetector.isProperIntrospection()) {
return;
}
String etalon = Util.getLocalResource("recursive/generics/with-children-as-map.yaml");
Constructor constructor = new Constructor();
TypeDescription Human2Description = new TypeDescription(HumanGen2.class);
Human2Description.putMapPropertyType("children", HumanGen2.class, String.class);
constructor.addTypeDescription(Human2Description);
Yaml yaml = new Yaml(constructor);
Map<HumanGen2, String> children2 = (Map<HumanGen2, String>) yaml.load(etalon);
assertNotNull(children2);
assertEquals(2, children2.size());