Testcase, added error handling