Added testcase, and fixed parser to run testcase successfully