@Test
public void formatsDollarLiterals() {

    CodeFormatter formatter = new CodeFormatter();
    String result = formatter.format('$', "hello $$", "", createWriter());
    assertThat(result, equalTo("hello $"));
}