@Test
public void qualityAverageAwardPeriod() throws Exception {

    final List<Document> qualityAverageAwardPeriod = averageTenderAndAwardPeriodsController
            .qualityAverageAwardPeriod(new DefaultFilterPagingRequest());
    final Document first = qualityAverageAwardPeriod.get(0);
    int totalAwardWithStartEndDates = (int) first
            .get(AverageTenderAndAwardPeriodsController.Keys.TOTAL_AWARD_WITH_START_END_DATES);
    int totalAwards = (int) first
            .get(AverageTenderAndAwardPeriodsController.Keys.TOTAL_AWARDS);
    double percentageAwardWithStartEndDates = (double) first
            .get(AverageTenderAndAwardPeriodsController.Keys.PERCENTAGE_AWARD_WITH_START_END_DATES);
    Assert.assertEquals(3, totalAwardWithStartEndDates);
    Assert.assertEquals(3, totalAwards);
    Assert.assertEquals(100.0, percentageAwardWithStartEndDates, 0);
}