Replaced try-catch in unit tests with assert(Not)Thrown().