Refactoring Kpi view data provider
Adding unit test for Kpi view data provider