Add test case for add snippet