public static UnifiedDiff parseUnifiedDiff(InputStream stream) throws IOException, UnifiedDiffParserException {
        UnifiedDiffReader parser = new UnifiedDiffReader(new BufferedReader(new InputStreamReader(stream)));
        return parser.parse();
    }
@Test
    public void testParseIssue84() throws IOException {
        UnifiedDiff diff = UnifiedDiffReader.parseUnifiedDiff(
                UnifiedDiffReaderTest.class.getResourceAsStream("problem_diff_issue84.diff"));

        assertThat(diff.getFiles().size()).isEqualTo(2);

        UnifiedDiffFile file1 = diff.getFiles().get(0);
        assertThat(file1.getFromFile()).isEqualTo("config/ant-phase-verify.xml");
        assertThat(file1.getPatch().getDeltas().size()).isEqualTo(1);

        UnifiedDiffFile file2 = diff.getFiles().get(1);
        assertThat(file2.getFromFile()).isEqualTo("/dev/null");
        assertThat(file2.getPatch().getDeltas().size()).isEqualTo(1);

        assertThat(diff.getTail()).isEqualTo("2.7.4");
        assertThat(diff.getHeader()).startsWith("From b53e612a2ab5ff15d14860e252f84c0f343fe93a Mon Sep 17 00:00:00 2001");
    }