@Test
public void appendTextWithEmbeddedNewlines() throws Exception {

    final String text = getConcatenatedText("\n");
    
    Connection conn = showDialog(TITLE).get();
    conn.append(text);
    windowFixture.robot.waitForIdle();
    String displayedText = windowFixture.textBox().text();
    
    String regex = "(\\n|\\r)+";
    assertEquals(text.replaceAll(regex, "|"), displayedText.replaceAll(regex, "|"));
}