@Test
public void testGetXmlProlog_ClosingAngleBracketIsTooFar() throws IOException {

    final StringBuilder spaces = new StringBuilder();
    for (int i = 0; i < 5000; i++) {
        spaces.append(" ");
    }
    final InputStream input = stringToStream("<?xml encoding=\"TEST\"?" + spaces + ">", "UTF-8");
    final String guessedEncoding = "UTF-8";
    expectedException.expect(IOException.class);
    XmlReader.getXmlProlog(input, guessedEncoding);
}