### Question:
ResourceTaskCommon { public static String prettyPrintYaml(Object value) throws IOException { return prettyPrintYaml(value, 0); } ResourceTaskCommon(Path workDir, FileService fileService, Evaluator evaluator); static String asString(String path); Object asJson(String path); Object asJson(String path, boolean eval); Object asYaml(String path); Object asYaml(String path, boolean eval); String writeAsJson(Object content); String writeAsString(String content); String writeAsYaml(Object content); static String prettyPrintJson(Object value); static String prettyPrintYaml(Object value); static String prettyPrintYaml(Object value, int indent);  }### Answer:
@Test public void testPrettyPrintYaml() throws Exception { Map<String, Object> m = new HashMap<>(); m.put("x", 123); m.put("y", Collections.singletonMap("a", false)); assertValidYaml(ResourceTaskCommon.prettyPrintYaml(m, 0)); assertValidYaml(String.format("value: %s", ResourceTaskCommon.prettyPrintYaml(m, 2))); assertValidYaml(String.format("value: %s", ResourceTaskCommon.prettyPrintYaml(Arrays.asList("a", "b", "c"), 2))); }