@Test
public void createFiveMinutes() throws Exception {

    // test all 3 ways to create five minutes
    DateTimePeriod period0 = DateTimePeriod.createFiveMinutes(2009, 2, 1, 9, 55, DateTimeZone.UTC);
    DateTimePeriod period1 = DateTimePeriod.createFiveMinutes(new DateTime(2009,2,1,9,55,0,0,DateTimeZone.UTC));
    DateTimePeriod period2 = DateTimePeriod.create(DateTimeDuration.FIVE_MINUTES, new DateTime(2009,2,1,9,55,0,0,DateTimeZone.UTC));
    DateTime correctStart = new DateTime(2009,2,1,9,55,0,0,DateTimeZone.UTC);
    DateTime correctEnd = new DateTime(2009,2,1,10,0,0,0,DateTimeZone.UTC);
    Assert.assertEquals(correctStart, period0.getStart());
    Assert.assertEquals(correctEnd, period0.getEnd());
    Assert.assertEquals(DateTimeDuration.FIVE_MINUTES, period0.getDuration());
    Assert.assertEquals("2009-02-01-09-55", period0.getKey());
    Assert.assertEquals("February 1, 2009 09:55", period0.getLongName());
    Assert.assertEquals("09:55", period0.getShortName());
    Assert.assertEquals("55", period0.getIndexName());
    Assert.assertEquals(correctStart, period1.getStart());
    Assert.assertEquals(correctEnd, period1.getEnd());
    Assert.assertEquals(DateTimeDuration.FIVE_MINUTES, period1.getDuration());
    Assert.assertEquals("2009-02-01-09-55", period1.getKey());
    Assert.assertEquals("February 1, 2009 09:55", period0.getLongName());
    Assert.assertEquals("09:55", period0.getShortName());
    Assert.assertEquals("55", period0.getIndexName());
    Assert.assertEquals(correctStart, period2.getStart());
    Assert.assertEquals(correctEnd, period2.getEnd());
    Assert.assertEquals(DateTimeDuration.FIVE_MINUTES, period2.getDuration());
    Assert.assertEquals("2009-02-01-09-55", period2.getKey());
    Assert.assertEquals("February 1, 2009 09:55", period0.getLongName());
    Assert.assertEquals("09:55", period0.getShortName());
    Assert.assertEquals("55", period0.getIndexName());
}