public static UnifiedDiff parseUnifiedDiff(InputStream stream) throws IOException, UnifiedDiffParserException {
        UnifiedDiffReader parser = new UnifiedDiffReader(new BufferedReader(new InputStreamReader(stream)));
        return parser.parse();
    }
@Test
    public void testParseIssue110() throws IOException {
        UnifiedDiff diff = UnifiedDiffReader.parseUnifiedDiff(
                UnifiedDiffReaderTest.class.getResourceAsStream("0001-avahi-python-Use-the-agnostic-DBM-interface.patch"));

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

        final UnifiedDiffFile file = diff.getFiles().get(4);
        assertThat(file.getSimilarityIndex()).isEqualTo(87);
        assertThat(file.getRenameFrom()).isEqualTo("service-type-database/build-db.in");
        assertThat(file.getRenameTo()).isEqualTo("service-type-database/build-db");

        assertThat(file.getFromFile()).isEqualTo("service-type-database/build-db.in");
        assertThat(file.getToFile()).isEqualTo("service-type-database/build-db");
    }