@Test
public void qualityAverageTenderPeriod() throws Exception {

    final List<Document> qualityAverageTenderPeriod = averageTenderAndAwardPeriodsController
            .qualityAverageTenderPeriod(new DefaultFilterPagingRequest());
    final Document first = qualityAverageTenderPeriod.get(0);
    int totalTenderWithStartEndDates = (int) first
            .get(AverageTenderAndAwardPeriodsController.Keys.TOTAL_TENDER_WITH_START_END_DATES);
    int totalTenders = (int) first
            .get(AverageTenderAndAwardPeriodsController.Keys.TOTAL_TENDERS);
    double percentageTenderWithStartEndDates = (double) first
            .get(AverageTenderAndAwardPeriodsController.Keys.PERCENTAGE_TENDER_WITH_START_END_DATES);
    Assert.assertEquals(3, totalTenderWithStartEndDates);
    Assert.assertEquals(3, totalTenders);
    Assert.assertEquals(100.0, percentageTenderWithStartEndDates, 0);
}