add test cases for metatable.