adding more tests for thrown exceptions