CommitHistogramFilter filter = new AuthorHistogramFilter();
CommitFinder finder = new CommitFinder(testRepo);
finder.setFilter(filter).find();
CommitCalendar cal = new CommitCalendar(filter.getHistogram()
.getUserActivity());
assertEquals(1, cal.getCount());
GregorianCalendar commitTime = new GregorianCalendar();
int month = commitTime.get(Calendar.MONTH);
int day = commitTime.get(Calendar.DAY_OF_MONTH) - 1;
int hour = commitTime.get(Calendar.HOUR_OF_DAY);
commitTime.setTime(commit.getAuthorIdent().getWhen());
assertEquals(1, cal.getDayCount(day));
assertEquals(1, cal.getMonthCount(month));
assertEquals(1, cal.getHourCount(hour));
assertEquals(1, cal.getDays()[day]);
assertEquals(1, cal.getMonths()[month]);
assertEquals(1, cal.getHours()[hour]);
assertEquals(1, cal.getYears().length);
YearCommitActivity year = cal.getYears()[0];
assertEquals(1, year.getCount());
assertEquals(commitTime.get(Calendar.YEAR), year.getYear());
assertNotNull(year.getMonths());
assertEquals(1, year.getMonths()[month]);
assertEquals(1, year.getMonthCount(Month.month(month)));