@Test
public void testParseModernStreamErrorWithLineAndTrailingSpace() throws IOException {

    List<CompilerMessage> messages = JDTCompiler.parseModernStream(
            createOutputForLines("1. ERROR in foo bar (at line 3) ", "2. ERROR in test (at line 5)"));
    assertEquals(2, messages.size());
    CompilerMessage message = messages.get(0);
    assertTrue(message.isError());
    assertEquals("", message.getMessage());
    assertEquals("foo bar", message.getFile());
    assertEquals(3, message.getStartLine());
    message = messages.get(1);
    assertTrue(message.isError());
    assertEquals("", message.getMessage());
    assertEquals("test", message.getFile());
    assertEquals(5, message.getStartLine());
}