### Question:
DateUtil { public boolean isSameYear(Date date, Date otherDate) { Calendar calendar = calendarFor(date); Calendar otherCalendar = calendarFor(otherDate); return calendar.get(Calendar.YEAR) == otherCalendar.get(Calendar.YEAR); }  boolean isSameMonth(Date date, Date otherDate); boolean isSameYear(Date date, Date otherDate); Calendar calendarFor(Date date); Date dateFor(int day, int month, int year); Calendar getCalendarWithTime(int hourOfTheDay, int minutes, int seconds);  }### Answer:
@Test public void isSameYear() { assertTrue(dateUtil.isSameYear(new Date(), new Date())); }
@Test public void isNotSameYear() { assertFalse(dateUtil.isSameYear(new Date(), DateUtils.addYears(new Date(), -1))); }