Adding test case & bug fixes to generate code for test case...