### Question:
QuarterlyPeriod implements Period { @Override public Date getStartDate() { return startDate; } QuarterlyPeriod(Date date); @Override void setStartDate(Date startDate); @Override void setEndDate(Date endDate); @Override Date getStartDate(); @Override Date getEndDate(); @Override String getAsIsoString(); static final String ISO_FORMAT; }### Answer:
@Test public void testGetStart() throws ParseException { QuarterlyPeriod instance = new QuarterlyPeriod(new SimpleDateFormat( "yyyy-MM-dd").parse("2012-08-19")); Date expResult = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss") .parse("2012-07-01T00:00:00"); Date result = instance.getStartDate(); assertEquals(expResult, result); }
@Test public void testGetStartLastQuarter() throws ParseException { QuarterlyPeriod instance = new QuarterlyPeriod(new SimpleDateFormat( "yyyy-MM-dd").parse("2012-10-19")); Date expResult = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss") .parse("2012-10-01T00:00:00"); Date result = instance.getStartDate(); assertEquals(expResult, result); }