@Test
public void testCreatePeriod()
{

    startDate = new DateTime( 2009, 7, 1, 0, 0 );
    endDate = new DateTime(2009, 8, 31, 0, 0 );
    testDate = new DateTime(2009, 8, 15, 0, 0 );
    
    Period period = periodType.createPeriod( testDate.toDate() );
    
    assertEquals( startDate.toDate(), period.getStartDate() );
    assertEquals( endDate.toDate(), period.getEndDate() );
    
    startDate = new DateTime( 2009, 3, 1, 0, 0 );
    endDate = new DateTime( 2009, 4, 30, 0, 0 );
    testDate = new DateTime( 2009, 3, 15, 0, 0 );
    period = periodType.createPeriod( testDate.toDate() );
    
    assertEquals( startDate.toDate(), period.getStartDate() );
    assertEquals( endDate.toDate(), period.getEndDate() );
}