public void cloneFilter() throws Exception {
add("file.txt", "abc");
RevCommit commit2 = add("file.txt", "abcd");
CommitListFilter commits = new CommitListFilter();
CommitFinder service = new CommitFinder(testRepo);
ParentCountFilter parents = new ParentCountFilter(1);
service.setFilter(new AndCommitFilter(parents, commits));
service.find();
assertEquals(commit2, commits.getCommits().get(0));
RevFilter clone = parents.clone();
assertNotNull(clone);
assertNotSame(parents, clone);
commits = new CommitListFilter();
service.setFilter(new AndCommitFilter(clone, commits));
service.find();
assertEquals(commit2, commits.getCommits().get(0));
}