@Test
public void testAddingStringThatIsTooLong() {

  final String initialText = StringUtils.rightPad("Initial string", LogTextArea
      .MAX_STRING_LENGTH, "Long\n");
  logTextArea.addLineToLog(initialText);
  assertNotEquals("The initial text should not have been appended as it was too long",
      initialText + "\n", logTextArea.getText());
}