@Test
public void copyTextToClipboard() throws Exception {

    final String text = getConcatenatedText(String.format("%n"));
    showDialog(TITLE, text).get();
    getButton("Copy to clipboard").click();
    windowFixture.robot.waitForIdle();
    
    Clipboard clip = Toolkit.getDefaultToolkit().getSystemClipboard();
    String clipText = (String) clip.getData(DataFlavor.stringFlavor);
    assertEquals(text, clipText);
}