class QuarterlyPeriod implements Period {

	@Override
	public Date getEndDate() {
		return endDate;
	}

}

class QuarterlyPeriodTest {

	@Test
	public void testGetEndLastQuarter() throws ParseException {

		QuarterlyPeriod instance = new QuarterlyPeriod(new SimpleDateFormat(
				"yyyy-MM-dd").parse("2012-10-19"));
		Date expResult = new SimpleDateFormat("yyyy-MM-dd").parse("2013-01-01");
		long time = expResult.getTime() - 1;
		expResult.setTime(time);

		Date result = instance.getEndDate();
		assertEquals(expResult, result);
	}

}