Add test cases and implement size.