Add test cases for moments functions