RevCommit commit2 = add("file2.txt", "b");
RevCommit commit3 = add("file2.txt", "c");
add("file3.txt", "d");
CommitCountFilter all = new CommitCountFilter();
CommitListFilter path = new CommitListFilter();
CommitFinder finder = new CommitFinder(testRepo);
finder.setFilter(new AllCommitFilter(all, new AndCommitFilter(
new CommitParentTreeFilter(PathFilterUtils.and("file2.txt")),
path)));
finder.find();
assertEquals(4, all.getCount());
assertEquals(2, path.getCommits().size());
assertTrue(path.getCommits().contains(commit2));
assertTrue(path.getCommits().contains(commit3));
}