*/
@Test public void shouldOrderCommitsByCommitDate() {
// given
Viewer viewer = mock(Viewer.class);
GitChangeSetSorter sorter = new GitChangeSetSorter();
GitModelCommit commit1 = mock(GitModelCommit.class);
GitModelCommit commit2 = mock(GitModelCommit.class);
Commit mockCommit1 = mock(Commit.class);
Commit mockCommit2 = mock(Commit.class);
when(mockCommit1.getCommitDate()).thenReturn(new Date(333333L));
when(mockCommit2.getCommitDate()).thenReturn(new Date(555555L));
when(commit1.getCachedCommitObj()).thenReturn(mockCommit1);
when(commit2.getCachedCommitObj()).thenReturn(mockCommit2);
// when
int actual1 = sorter.compare(viewer, commit1, commit2);
int actual2 = sorter.compare(viewer, commit2, commit1);