Fixed tests which were not checking for right Exception class