String output = yaml2.dumpAsMap(result);
assertFalse("No tags expected.", output.contains("Sub1"));
// System.out.println(output);
// parse back. Without tags it shall still work
Yaml beanLoader = new Yaml();
TestObject result2 = beanLoader.loadAs(output, TestObject.class);
assertEquals(0, result2.getSub1().getAtt2());
assertEquals("MyString", result2.getSub2().getAtt1());
assertEquals(1, result2.getSub2().getAtt2().size());
assertEquals(12345, result2.getSub2().getAtt3());
}