Add test cases and example