Fix UT failures
Merge pull request #146 from Juniper/bugs

Fix UT failures in test_kstate and test_stats_mock