@Test
public void costEffectivenessAwardAmount() throws Exception {

    final List<Document> costEffectivenessAwardAmount = costEffectivenessVisualsController
            .costEffectivenessAwardAmount(new YearFilterPagingRequest());
    final Document first = costEffectivenessAwardAmount.get(0);
    int year = (int) first.get(CostEffectivenessVisualsController.Keys.YEAR);
    double totalAwardAmount = (double) first.get(CostEffectivenessVisualsController.Keys.TOTAL_AWARD_AMOUNT);
    int totalAwards = (int) first.get(CostEffectivenessVisualsController.Keys.TOTAL_AWARDS);
    int totalAwardsWithTender = (int) first.get(CostEffectivenessVisualsController.Keys.TOTAL_AWARDS_WITH_TENDER);
    double percentageAwardsWithTender = (double) first.
            get(CostEffectivenessVisualsController.Keys.PERCENTAGE_AWARDS_WITH_TENDER);
    Assert.assertEquals(2014, year);
    Assert.assertEquals(6000000.0, totalAwardAmount, 0);
    Assert.assertEquals(1, totalAwards);
    Assert.assertEquals(1, totalAwardsWithTender);
    Assert.assertEquals(100.0, percentageAwardsWithTender, 0);
    final Document second = costEffectivenessAwardAmount.get(1);
    year = (int) second.get(CostEffectivenessVisualsController.Keys.YEAR);
    totalAwardAmount = (double) second.get(CostEffectivenessVisualsController.Keys.TOTAL_AWARD_AMOUNT);
    totalAwards = (int) second.get(CostEffectivenessVisualsController.Keys.TOTAL_AWARDS);
    totalAwardsWithTender = (int) second.get(CostEffectivenessVisualsController.Keys.TOTAL_AWARDS_WITH_TENDER);
    percentageAwardsWithTender = (double) second.
            get(CostEffectivenessVisualsController.Keys.PERCENTAGE_AWARDS_WITH_TENDER);
    Assert.assertEquals(2015, year);
    Assert.assertEquals(40000.0, totalAwardAmount, 0);
    Assert.assertEquals(1, totalAwards);
    Assert.assertEquals(1, totalAwardsWithTender);
    Assert.assertEquals(100.0, percentageAwardsWithTender, 0);
}