Added gitignore file and wrote test case.