@Test
public void testGeneratePeriods()
{

    testDate = new DateTime( 2009, 8, 15, 0, 0 );
    
    List<Period> periods = periodType.generatePeriods( testDate.toDate() );
    
    assertEquals( 11, periods.size() );
    assertEquals( periodType.createPeriod( new DateTime(  2004, 1, 1, 0, 0 ).toDate() ), periods.get( 0 ) );
    assertEquals( periodType.createPeriod( new DateTime(  2005, 1, 1, 0, 0 ).toDate() ), periods.get( 1 ) );
    assertEquals( periodType.createPeriod( new DateTime(  2006, 1, 1, 0, 0 ).toDate() ), periods.get( 2 ) );
    assertEquals( periodType.createPeriod( new DateTime(  2007, 1, 1, 0, 0 ).toDate() ), periods.get( 3 ) );
    assertEquals( periodType.createPeriod( new DateTime(  2008, 1, 1, 0, 0 ).toDate() ), periods.get( 4 ) );
    assertEquals( periodType.createPeriod( new DateTime(  2009, 1, 1, 0, 0 ).toDate() ), periods.get( 5 ) );
    assertEquals( periodType.createPeriod( new DateTime(  2010, 1, 1, 0, 0 ).toDate() ), periods.get( 6 ) );
    assertEquals( periodType.createPeriod( new DateTime(  2011, 1, 1, 0, 0 ).toDate() ), periods.get( 7 ) );
    assertEquals( periodType.createPeriod( new DateTime(  2012, 1, 1, 0, 0 ).toDate() ), periods.get( 8 ) );
    assertEquals( periodType.createPeriod( new DateTime(  2013, 1, 1, 0, 0 ).toDate() ), periods.get( 9 ) );
    assertEquals( periodType.createPeriod( new DateTime(  2014, 1, 1, 0, 0 ).toDate() ), periods.get( 10 ) );
}