@Test
public void testGeneratePeriods()
{

    testDate = new DateTime( 2009, 8, 15, 0, 0 );
    
    List<Period> periods = periodType.generatePeriods( testDate.toDate() );
    
    assertEquals( 6, periods.size() );
    assertEquals( periodType.createPeriod( new DateTime( 2009, 1, 1, 0, 0 ).toDate() ), periods.get( 0 ) );
    assertEquals( periodType.createPeriod( new DateTime( 2009, 3, 1, 0, 0 ).toDate() ), periods.get( 1 ) );
    assertEquals( periodType.createPeriod( new DateTime( 2009, 5, 1, 0, 0 ).toDate() ), periods.get( 2 ) );
    assertEquals( periodType.createPeriod( new DateTime( 2009, 7, 1, 0, 0 ).toDate() ), periods.get( 3 ) );
    assertEquals( periodType.createPeriod( new DateTime( 2009, 9, 1, 0, 0 ).toDate() ), periods.get( 4 ) );
    assertEquals( periodType.createPeriod( new DateTime( 2009, 11, 1, 0, 0 ).toDate() ), periods.get( 5 ) );
}