@Test
public void testDateRetrieving() {
DateTime date = new DateTime(2013, 10, 2, 12, 0);
Last14DaysDateRangeHandler handler = new Last14DaysDateRangeHandler();
DateTime dateStart = handler.retrieveDateStart(date);
Assert.assertEquals(2013, dateStart.getYear());
Assert.assertEquals(9, dateStart.getMonthOfYear());
Assert.assertEquals(18, dateStart.getDayOfMonth());
DateTime dateEnd = handler.retrieveDateEnd(date);
Assert.assertEquals(2013, dateEnd.getYear());
Assert.assertEquals(10, dateEnd.getMonthOfYear());
Assert.assertEquals(2, dateEnd.getDayOfMonth());
DateTime dateMonth = handler.retrieveMonth(date);
Assert.assertNull(dateMonth);
}