Yaml yaml = new Yaml(repr);
String output = yaml.dump(new Wrapper(bean));
// System.out.println(output);
assertEquals("!mybean {age: -47, color: Violet, name: Bahrack, type: Type3}\n", output);
// parse back to instance
Constructor constr = new Constructor();
TypeDescription description = new TypeDescription(Wrapper.class, new Tag("!mybean"));
constr.addTypeDescription(description);
yaml = new Yaml(constr);
Wrapper wrapper = (Wrapper) yaml.load(output);
JavaBeanWithStaticState bean2 = wrapper.createBean();
assertEquals(-47, bean2.getAge());
assertEquals("Bahrack", bean2.getName());