added testcase with switch block