@Test
public void testWeeklyWith5days() throws Exception {

    final TemporalResolution daily = TemporalResolution.weekly5d;
    Date startDate = TimeUtil.parseShortUtcFormat("2012-11-01");
    //execution 1
    Date endDate = TimeUtil.parseShortUtcFormat("2012-11-05");
    List<RegriddingTimeStep> results = regriddingAggregator.aggregate(startDate, endDate, daily);
    //verification 1
    assertEquals(1, results.size());
    //execution 2
    endDate = TimeUtil.parseShortUtcFormat("2012-11-23");
    results = regriddingAggregator.aggregate(startDate, endDate, daily);
    //verification 2
    assertEquals("", 5, results.size());
    assertEquals("2012-11-01", df.format(results.get(0).getStartDate()));
    assertEquals("2012-11-06", df.format(results.get(0).getEndDate()));
    assertEquals("2012-11-06", df.format(results.get(1).getStartDate()));
    assertEquals("2012-11-11", df.format(results.get(1).getEndDate()));
    assertEquals("2012-11-11", df.format(results.get(2).getStartDate()));
    assertEquals("2012-11-16", df.format(results.get(2).getEndDate()));
    assertEquals("2012-11-16", df.format(results.get(3).getStartDate()));
    assertEquals("2012-11-21", df.format(results.get(3).getEndDate()));
    assertEquals("2012-11-21", df.format(results.get(4).getStartDate()));
    assertEquals("2012-11-26", df.format(results.get(4).getEndDate()));
}