String output = yaml.dumpAsMap(father);
String etalon = Util.getLocalResource("recursive/generics/no-children-2.yaml");
assertEquals(etalon, output);
//
Yaml loader = new Yaml();
HumanGen father2 = (HumanGen) loader.loadAs(etalon, HumanGen.class);
assertNotNull(father2);
assertEquals("Father", father2.getName());
assertEquals("Mother", father2.getPartner().getName());
assertEquals("Father", father2.getBankAccountOwner().getName());
assertSame(father2, father2.getBankAccountOwner());