Fixed severity bug
Fixed NPE in KpiHistoryJob
Added unit test