@Test
public void totalEligibleProjectsByIndicatorTypeByYearTest() throws Exception {

    final List<Document> result = corruptionRiskDashboardIndicatorsStatsController
            .totalEligibleProjectsByIndicatorTypeByYear(new YearFilterPagingRequest());
    Assert.assertEquals(6, result.size());
    Assert.assertEquals(FlagType.COLLUSION.toString(), result.get(0).get(CorruptionRiskDashboardIndicatorsStatsController
            .Keys.TYPE));
    Assert.assertEquals(2014, result.get(0).get(CorruptionRiskDashboardIndicatorsStatsController.Keys.YEAR));
    Assert.assertEquals(1, result.get(0).get(CorruptionRiskDashboardIndicatorsStatsController.Keys
            .ELIGIBLE_COUNT));
    Assert.assertEquals(1, result.get(0).get(CorruptionRiskDashboardIndicatorsStatsController.Keys
            .ELIGIBLE_PROJECT_COUNT));
    Assert.assertEquals(FlagType.FRAUD.toString(), result.get(1).get(CorruptionRiskDashboardIndicatorsStatsController
            .Keys.TYPE));
    Assert.assertEquals(2014, result.get(1).get(CorruptionRiskDashboardIndicatorsStatsController.Keys.YEAR));
    Assert.assertEquals(1, result.get(1).get(CorruptionRiskDashboardIndicatorsStatsController.Keys.ELIGIBLE_COUNT));
    Assert.assertEquals(1, result.get(1).get(CorruptionRiskDashboardIndicatorsStatsController.Keys.ELIGIBLE_PROJECT_COUNT));
    Assert.assertEquals(FlagType.RIGGING.toString(), result.get(2).get
            (CorruptionRiskDashboardIndicatorsStatsController
            .Keys.TYPE));
    Assert.assertEquals(2014, result.get(2).get(CorruptionRiskDashboardIndicatorsStatsController.Keys.YEAR));
    Assert.assertEquals(1, result.get(2).get(CorruptionRiskDashboardIndicatorsStatsController.Keys
            .ELIGIBLE_COUNT));
    Assert.assertEquals(1, result.get(2).get(CorruptionRiskDashboardIndicatorsStatsController.Keys
            .ELIGIBLE_PROJECT_COUNT));
    Assert.assertEquals(FlagType.COLLUSION.toString(), result.get(3).get
            (CorruptionRiskDashboardIndicatorsStatsController
            .Keys.TYPE));
    Assert.assertEquals(2015, result.get(3).get(CorruptionRiskDashboardIndicatorsStatsController.Keys.YEAR));
    Assert.assertEquals(1, result.get(3).get(CorruptionRiskDashboardIndicatorsStatsController.Keys
            .ELIGIBLE_COUNT));
    Assert.assertEquals(1, result.get(3).get(CorruptionRiskDashboardIndicatorsStatsController.Keys
            .ELIGIBLE_PROJECT_COUNT));
}