@Test
public void percentTotalProjectsFlaggedByYearTest() throws Exception {

    final List<Document> result = corruptionRiskDashboardIndicatorsStatsController
            .percentTotalProjectsFlaggedByYear(new YearFilterPagingRequest());
    Assert.assertEquals(1, result.size());
    Assert.assertEquals(2015, result.get(0).get(CorruptionRiskDashboardIndicatorsStatsController.Keys.YEAR));
    Assert.assertEquals(FlagType.RIGGING.toString(), result.get(0).get(CorruptionRiskDashboardIndicatorsStatsController.Keys.TYPE));
    Assert.assertEquals(2, result.get(0).get(CorruptionRiskDashboardIndicatorsStatsController.Keys.FLAGGED_COUNT));
    Assert.assertEquals(1, result.get(0).get(CorruptionRiskDashboardIndicatorsStatsController.Keys.FLAGGED_PROJECT_COUNT));
    Assert.assertEquals(2, result.get(0).get(CorruptionRiskDashboardIndicatorsStatsController.Keys.PROJECT_COUNT));
    Assert.assertTrue(BigDecimal.valueOf(50).
            compareTo((BigDecimal)result.get(0).get(CorruptionRiskDashboardIndicatorsStatsController.Keys.PERCENT))==0);
}