@Test
public void testWeeklyWith7days() throws Exception {

    final TemporalResolution daily = TemporalResolution.weekly7d;
    Date startDate = TimeUtil.parseShortUtcFormat("2012-11-01");
    //execution 1
    Date endDate = TimeUtil.parseShortUtcFormat("2012-11-07");
    List<RegriddingTimeStep> results = regriddingAggregator.aggregate(startDate, endDate, daily);
    //verification 1
    assertEquals("7 days, will give 1 week", 1, results.size());
    //execution 2
    endDate = TimeUtil.parseShortUtcFormat("2012-11-23");
    results = regriddingAggregator.aggregate(startDate, endDate, daily);
    //verification 2
    assertEquals("23 days, will give 3 weeks plus 1 incomplete week", 4, results.size());
    assertEquals("2012-11-01", df.format(results.get(0).getStartDate()));
    assertEquals("2012-11-08", df.format(results.get(0).getEndDate()));
    assertEquals("2012-11-08", df.format(results.get(1).getStartDate()));
    assertEquals("2012-11-15", df.format(results.get(1).getEndDate()));
    assertEquals("2012-11-15", df.format(results.get(2).getStartDate()));
    assertEquals("2012-11-22", df.format(results.get(2).getEndDate()));
    assertEquals("2012-11-22", df.format(results.get(3).getStartDate()));
    assertEquals("2012-11-29", df.format(results.get(3).getEndDate()));
}