ci = getEDBCommit();
ci.setComment("this is a comment");
ci.update(obj);
Long timestamp2 = db.commit(ci);
String revision2 = ci.getRevisionNumber().toString();
CommitQueryRequest request = new CommitQueryRequest();
request.setCommitter("wrongName");
assertThat(db.getRevisionsOfMatchingCommits(request).size(), is(0));
request = new CommitQueryRequest();
request.setCommitter("wrongContext");
assertThat(db.getRevisionsOfMatchingCommits(request).size(), is(0));
request = new CommitQueryRequest();
request.setStartTimestamp(timestamp1);
List<CommitMetaInfo> revisions = db.getRevisionsOfMatchingCommits(request);
assertThat(revisions.size(), is(2));
assertThat(revisions.get(0).getRevision(), is(revision1));
assertThat(revisions.get(1).getRevision(), is(revision2));
request = new CommitQueryRequest();
request.setStartTimestamp(timestamp1);
request.setCommitter("testuser");
revisions = db.getRevisionsOfMatchingCommits(request);
assertThat(revisions.size(), is(2));
assertThat(revisions.get(0).getRevision(), is(revision1));
assertThat(revisions.get(1).getRevision(), is(revision2));
request = new CommitQueryRequest();
request.setStartTimestamp(timestamp2);
revisions = db.getRevisionsOfMatchingCommits(request);
assertThat(revisions.size(), is(1));
assertThat(revisions.get(0).getRevision(), is(revision2));
assertThat(revisions.get(0).getCommitter(), is(COMMITTER));