Added separate test class for testing exceptions.