add unit test for stats view
Merge pull request #278 from hyperkang/test_stats_view

add unit test for stats view