added exception handling for genericTestCase