### Question:
DateUtil { public boolean isSameMonth(Date date, Date otherDate) { Calendar calendar = calendarFor(date); Calendar otherCalendar = calendarFor(otherDate); return calendar.get(Calendar.MONTH) == otherCalendar.get(Calendar.MONTH); }  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 isSameMonth() { assertTrue(dateUtil.isSameMonth(new Date(), new Date())); }
@Test public void isNotSameMonth() { assertFalse(dateUtil.isSameMonth(new Date(), DateUtils.addMonths(new Date(), -1))); }