@Test
public void requiresTextAfterOpeningBrace() {

    Assertions.assertThrows(IllegalArgumentException.class, () -> {
        CodeFormatter formatter = new CodeFormatter();
        formatter.format('$', "hello ${", "", createWriter(), "there");
    });
}