### Question:
TimelineUtilities { public static TimeSpan getThisMonth(Date time) { GregorianCalendar cal = new GregorianCalendar(); cal.setTime(time); GregorianCalendar spanCal = new GregorianCalendar(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), 1); long start = spanCal.getTimeInMillis(); spanCal.add(Calendar.MONTH, 1); long end = spanCal.getTimeInMillis(); return TimeSpan.get(start, end); } private  TimelineUtilities(); static void addDuration(Calendar calendar, Duration duration); static Calendar get0000(); static Calendar get0000(Date aDate); static List<TimeSpan> getIntervalsForSpan(Date startDate, TimeSpan span, int spanType); static Calendar getNext0000(Date aDate); static TimeSpan getPartialWeek(); static TimeSpan getPrecedingMonths(Date reference, int months, boolean includeThisMonth); static TimeSpan getPrecedingMonths(int months, boolean includeThisMonth); static TimeSpan getPrecedingWeeks(Date reference, int numWeeks, boolean includeThisWeek); static TimeSpan getPrecedingWeeks(int numWeeks, boolean includeThisWeek); static Map<Duration, List<DateDurationKey>> getTableOfLegalDates(TimeSpan span, Duration duration); static TimeSpan getThisDay(Date time); static TimeSpan getThisMonth(Date time); static TimeSpan getThisWeek(Date time); static TimeSpan getToday(); static TimeSpan getYesterday(); static boolean isAt0000(Date aDate); static boolean isDayWeekMonth(TimeSpan span); static boolean isDay(TimeSpan span); static boolean isWeek(TimeSpan span); static boolean isMonth(TimeSpan span); static boolean isRounded(Date time, Duration duration); static Calendar roundDown(Date date, Duration interval); static Calendar roundUp(Date date, Duration interval); static TimeSpan scale(TimeSpan span, double factor);  }### Answer:
@Test public void testGetThisMonth() { GregorianCalendar month = new GregorianCalendar(1972, 1, 1); GregorianCalendar nextMonth = new GregorianCalendar(1972, 2, 1); GregorianCalendar testTime = new GregorianCalendar(1972, 1, 11, 10, 53, 35); TimeSpan span = TimelineUtilities.getThisMonth(testTime.getTime()); Assert.assertEquals(month.getTimeInMillis(), span.getStart()); Assert.assertEquals(nextMonth.getTimeInMillis(), span.getEnd()); span = TimelineUtilities.getThisMonth(month.getTime()); Assert.assertEquals(month.getTimeInMillis(), span.getStart()); Assert.assertEquals(nextMonth.getTimeInMillis(), span.getEnd()); }