@Test public void line_with_fullcomment_when_structure_changes() { String source = "a:\n\n b: value1\n\n\n"+"#This is here!\n---\na:\n\n b: value1 #comment of b"; String expected = "a:\n b: value1\n"+"#This is here!\n---\na:\n b: value1 #comment of b"; String result = formatterToTest.format(source); assertEquals(expected,result); }
public String format(String source) { return format(source, null); }
YamlSourceFormatter { public String format(String source) { return format(source, null); } }
YamlSourceFormatter { public String format(String source) { return format(source, null); }  }
YamlSourceFormatter { public String format(String source) { return format(source, null); }  String format(String source); String format(String source, YamlSourceFormatterConfig config); }
YamlSourceFormatter { public String format(String source) { return format(source, null); }  String format(String source); String format(String source, YamlSourceFormatterConfig config);  }