Added exceptions testing for 100% coverage