### Question:
YamlUtil { public static StringWriter dump(Object obj) { Yaml yaml = new Yaml(); StringWriter stringWriter = new StringWriter(); yaml.dump(obj, stringWriter); return stringWriter; }  final static String key(String key); static List<LinkedHashMap<String, String>> getYmlByFileNamePerfect(String filename); static LinkedHashMap<String, String> getYmlByFileName(String filename); static Map<String, String> forEachYaml(String key_str, Map<String, Object> obj); static String getValue(String filename, String key); static StringWriter dump(Object obj); static StringWriter dumpAll(List list);  }### Answer:
@Test public void dump() { Address adr = new Address(); adr.setCity("Royal Oak"); adr.setLines("458 Walkman"); adr.setPostal("48046"); adr.setState("MI"); Yaml yaml = new Yaml(); StringWriter stringWriter = new StringWriter(); yaml.dump(adr, stringWriter); System.out.println(stringWriter.toString()); }